Commit 6047a99e authored by Stan Hu's avatar Stan Hu

Merge branch...

Merge branch '43570-localstorage-clear-error-when-feature-test-fails-before-visiting-page' into 'master'

Resolve "localStorage.clear() error when Capybara test fails before visiting page"

Closes #43570

See merge request gitlab-org/gitlab-ce!17339
parents af5da29d c14cb5bf
......@@ -78,8 +78,10 @@ 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();")
# prevent localStorage from introducing side effects based on test order
unless ['', 'about:blank', 'data:,'].include? Capybara.current_session.driver.browser.current_url
execute_script("localStorage.clear();")
end
# capybara/rspec already calls Capybara.reset_sessions! in an `after` hook,
# but `block_and_wait_for_requests_complete` is called before it so by
......
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