Skip to content

Commit

Permalink
Enable larger screensize for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mejackreed authored and cbeer committed Oct 31, 2019
1 parent 2e49941 commit 75fe8ce
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,18 @@
require_relative 'support/controller_level_helpers'
require 'selenium-webdriver'

Capybara.javascript_driver = :selenium_chrome_headless
Capybara.javascript_driver = :headless_chrome

Capybara.register_driver :headless_chrome do |app|
Capybara::Selenium::Driver.load_selenium
browser_options = ::Selenium::WebDriver::Chrome::Options.new.tap do |opts|
opts.args << '--headless'
opts.args << '--disable-gpu'
opts.args << '--no-sandbox'
opts.args << '--window-size=1280,1696'
end
Capybara::Selenium::Driver.new(app, browser: :chrome, options: browser_options)
end

# Add additional requires below this line. Rails is not loaded until this point!

Expand Down

0 comments on commit 75fe8ce

Please sign in to comment.