move resize option the pre-test hooks instead of post-test

This commit is contained in:
Mike Greiling 2017-11-01 12:17:13 -05:00
parent 3839dd0dba
commit 9d9affdca3
No known key found for this signature in database
GPG Key ID: 0303DF507FA67596
1 changed files with 3 additions and 3 deletions

View File

@ -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();")