Commit 3f3875db authored by Mike Greiling's avatar Mike Greiling

make window resizing more resiliant on small screens when headless mode is off

parent 2304550b
...@@ -41,13 +41,17 @@ RSpec.configure do |config| ...@@ -41,13 +41,17 @@ RSpec.configure do |config|
end end
config.before(:example, :js) do config.before(:example, :js) do
session = Capybara.current_session
allow(Gitlab::Application.routes).to receive(:default_url_options).and_return( allow(Gitlab::Application.routes).to receive(:default_url_options).and_return(
host: Capybara.current_session.server.host, host: session.server.host,
port: Capybara.current_session.server.port, port: session.server.port,
protocol: 'http') protocol: 'http')
# reset window size between tests # reset window size between tests
Capybara.current_session.current_window.resize_to(1240, 1400) unless session.current_window.size == [1240, 1400]
session.current_window.resize_to(1240, 1400) rescue nil
end
end end
config.after(:example, :js) do |example| config.after(:example, :js) do |example|
......
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