Commit ce7449ce authored by Mike Greiling's avatar Mike Greiling

clear localStorage after each capybara test (global)

parent 95d629a1
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment