Resize Capybara window back to its original size

The `maximize` method didn't work as we expected and didn't resize the
window, causing issues in tests expecting the window to be larger.
This commit is contained in:
Javi Martín
2019-05-24 12:22:21 +02:00
parent 2c85e293cf
commit 605da522cb

View File

@@ -179,13 +179,14 @@ feature "Proposals" do
end
context "Show on mobile screens" do
let!(:window_size) { Capybara.current_window.size }
before do
Capybara.page.driver.browser.manage.window.resize_to(640, 480)
Capybara.current_window.resize_to(640, 480)
end
after do
Capybara.page.driver.browser.manage.window.maximize
Capybara.current_window.resize_to(*window_size)
end
scenario "Show support button sticky at bottom", :js do