Skip to content

Commit

Permalink
Revert to selenium's default config
Browse files Browse the repository at this point in the history
Problems should be fixed in chrome 122
  • Loading branch information
jcoyne committed Feb 12, 2024
1 parent 7d2abb9 commit 5b66e77
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,7 @@
require 'view_component/test_helpers'
require 'view_component/system_test_helpers'

# Capybara 3.40.0 started using the new chrome headless by default:
# https://developer.chrome.com/docs/chromium/new-headless
# We need a driver with the "--headless=old" argument until
# our tests work with "new".
Capybara.register_driver :selenium_chrome_headless_old do |app|
browser_options = Selenium::WebDriver::Chrome::Options.new
browser_options.add_argument('--headless=old')
browser_options.add_argument('--disable-site-isolation-trials')
Capybara::Selenium::Driver.new(app, browser: :chrome, options: browser_options)
end

Capybara.javascript_driver = :selenium_chrome_headless_old
Capybara.javascript_driver = :selenium_chrome_headless
Capybara.enable_aria_label = true
Capybara.default_max_wait_time = ENV['CI'] ? 30 : 5

Expand Down

0 comments on commit 5b66e77

Please sign in to comment.