-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tests with newer version of chromedriver
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# frozen_string_literal: true | ||
|
||
# This re-registration is made because of problems with chromedriver v120. | ||
# Selenium methods are undefined without this change. | ||
# See: https://github.com/decidim/decidim/pull/12160 | ||
|
||
require "selenium-webdriver" | ||
|
||
module Decidim | ||
Capybara.register_driver :headless_chrome do |app| | ||
options = ::Selenium::WebDriver::Chrome::Options.new | ||
options.args << "--headless=new" | ||
options.args << "--no-sandbox" | ||
options.args << if ENV["BIG_SCREEN_SIZE"].present? | ||
"--window-size=1920,3000" | ||
else | ||
"--window-size=1920,1080" | ||
end | ||
options.args << "--ignore-certificate-errors" if ENV["TEST_SSL"] | ||
Capybara::Selenium::Driver.new( | ||
app, | ||
browser: :chrome, | ||
capabilities: [options] | ||
) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters