Skip to content

Commit

Permalink
Add in firefox refs to automation helpers and use headless
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-hill committed Jan 31, 2024
1 parent ad46d23 commit f4d3db8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

SimpleCov.start if defined?(SimpleCov) && RUBY_VERSION < '3.1'

browser = ENV.fetch('BROWSER', 'chrome').to_sym
browser = ENV.fetch('BROWSER', 'firefox').to_sym
ENV['HEADLESS'] = 'true'

options =
if browser == :chrome
Expand All @@ -30,7 +31,7 @@
opts.add_argument('--disable-gpu')
end
else
Selenium::WebDriver::Firefox::Options.new.tap { |opts| opts.add_argument('-headless') }
AutomationHelpers::Drivers::V4::Options.for(:firefox)
end

Capybara.register_driver :site_prism do |app|
Expand Down

0 comments on commit f4d3db8

Please sign in to comment.