Skip to content

Commit

Permalink
fix: Spec helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentinchampenois committed Mar 6, 2024
1 parent 81f9516 commit d54e73e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,20 @@
Decidim::Dev.dummy_app_path = File.expand_path(File.join(__dir__, "decidim_dummy_app"))

require "decidim/dev/test/base_spec_helper"

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

0 comments on commit d54e73e

Please sign in to comment.