From 1b08b84f9201816c8ee525d873ed1cb23f8808f4 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Tue, 15 Dec 2020 12:29:07 +0100 Subject: [PATCH] Maintenance: Ensure that the window of the different browsers has the same and consistent size to avoid diverging behavior. --- spec/support/capybara/driven_by.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/support/capybara/driven_by.rb b/spec/support/capybara/driven_by.rb index bbac911c3..398eaed9c 100644 --- a/spec/support/capybara/driven_by.rb +++ b/spec/support/capybara/driven_by.rb @@ -22,5 +22,9 @@ RSpec.configure do |config| # set custom Zammad driver (e.g. zammad_chrome) for special # functionalities and CI requirements driven_by(:"zammad_#{ENV.fetch('BROWSER', 'firefox')}") + + browser_width = ENV['BROWSER_WIDTH'] || 1024 + browser_height = ENV['BROWSER_HEIGHT'] || 800 + page.driver.browser.manage.window.resize_to(browser_width, browser_height) end end