move resize option the pre-test hooks instead of post-test
This commit is contained in:
parent
3839dd0dba
commit
9d9affdca3
|
@ -45,12 +45,12 @@ RSpec.configure do |config|
|
|||
host: Capybara.current_session.server.host,
|
||||
port: Capybara.current_session.server.port,
|
||||
protocol: 'http')
|
||||
|
||||
# reset window size between tests
|
||||
Capybara.current_session.current_window.resize_to(1240, 1400)
|
||||
end
|
||||
|
||||
config.after(:example, :js) do |example|
|
||||
# reset window size between tests
|
||||
Capybara.current_session.current_window.resize_to(1240, 1400);
|
||||
|
||||
# prevent localstorage from introducing side effects based on test order
|
||||
execute_script("localStorage.clear();")
|
||||
|
||||
|
|
Loading…
Reference in New Issue