From 60037485de0b43f4be406cd8ad8c598af58e081d Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 2 Nov 2023 14:07:33 +1100 Subject: [PATCH] Clarify cuprite driver configuration Rails is registering a driver called `cuprite`. And when we did that as well the driver got registered three times somehow. It looked like our driver options were used in the end but just to clarify I gave it a unique name. This was inspired by: * https://github.com/ViewComponent/view_component/pull/1877 It suggests that it may avoid dead browser errors on CI. We'll see. --- spec/system/support/cuprite_setup.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/system/support/cuprite_setup.rb b/spec/system/support/cuprite_setup.rb index 9995ba96425..d3d5cd06c15 100644 --- a/spec/system/support/cuprite_setup.rb +++ b/spec/system/support/cuprite_setup.rb @@ -7,7 +7,7 @@ browser_options = {} browser_options["no-sandbox"] = nil if ENV['CI'] -Capybara.register_driver(:cuprite) do |app| +Capybara.register_driver(:cuprite_ofn) do |app| Capybara::Cuprite::Driver.new( app, **{ @@ -24,14 +24,14 @@ ) end -# Configure Capybara to use :cuprite driver by default -Capybara.default_driver = Capybara.javascript_driver = :cuprite +# Configure Capybara to use :cuprite_ofn driver by default +Capybara.default_driver = Capybara.javascript_driver = :cuprite_ofn RSpec.configure do |config| config.include CupriteHelpers, type: :system config.include Devise::Test::IntegrationHelpers, type: :system - config.prepend_before(:each, type: :system) { driven_by :cuprite } + config.prepend_before(:each, type: :system) { driven_by :cuprite_ofn } # Make sure url helpers in mailers use the Capybara server host. config.around(:each, type: :system) do |example|