clear localStorage after each capybara test (global)
This commit is contained in:
parent
95d629a1ea
commit
ce7449ce03
3 changed files with 3 additions and 8 deletions
|
@ -16,10 +16,6 @@ feature 'GFM autocomplete', :js do
|
|||
wait_for_requests
|
||||
end
|
||||
|
||||
after do
|
||||
execute_script("localStorage.clear();")
|
||||
end
|
||||
|
||||
it 'updates issue descripton with GFM reference' do
|
||||
find('.issuable-edit').click
|
||||
|
||||
|
|
|
@ -11,10 +11,6 @@ feature 'Issue markdown toolbar', :js do
|
|||
visit project_issue_path(project, issue)
|
||||
end
|
||||
|
||||
after do
|
||||
execute_script("localStorage.clear();")
|
||||
end
|
||||
|
||||
it "doesn't include first new line when adding bold" do
|
||||
find('#note-body').native.send_keys('test')
|
||||
find('#note-body').native.send_key(:enter)
|
||||
|
|
|
@ -45,6 +45,9 @@ RSpec.configure do |config|
|
|||
end
|
||||
|
||||
config.after(:example, :js) do |example|
|
||||
# prevent localstorage from introducing side effects based on test order
|
||||
execute_script("localStorage.clear();")
|
||||
|
||||
# capybara/rspec already calls Capybara.reset_sessions! in an `after` hook,
|
||||
# but `block_and_wait_for_requests_complete` is called before it so by
|
||||
# calling it explicitely here, we prevent any new requests from being fired
|
||||
|
|
Loading…
Reference in a new issue