diff --git a/Gemfile b/Gemfile index 388fb5e3..fb54c148 100644 --- a/Gemfile +++ b/Gemfile @@ -93,7 +93,6 @@ group :test do gem "selenium-webdriver" gem "simplecov", require: false gem "timecop" - gem "webdrivers" end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem diff --git a/Gemfile.lock b/Gemfile.lock index 0a766d32..c02f7ebb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -62,8 +62,8 @@ GEM minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.5) + public_suffix (>= 2.0.2, < 6.0) airbrussh (1.4.1) sshkit (>= 1.6.1, != 1.7.0) ast (2.4.2) @@ -94,7 +94,7 @@ GEM capistrano-bundler (~> 1.1) capistrano-yarn (2.0.2) capistrano (~> 3.0) - capybara (3.37.1) + capybara (3.39.2) addressable matrix mini_mime (>= 0.1.3) @@ -192,7 +192,7 @@ GEM matrix (0.4.2) method_source (0.9.2) mini_mime (1.1.5) - mini_portile2 (2.8.4) + mini_portile2 (2.8.5) minitest (5.20.0) msgpack (1.4.5) multi_json (1.13.1) @@ -210,7 +210,7 @@ GEM net-protocol net-ssh (7.2.0) nio4r (2.5.9) - nokogiri (1.15.4) + nokogiri (1.15.5) mini_portile2 (~> 2.8.2) racc (~> 1.4) omniauth (1.9.2) @@ -235,10 +235,10 @@ GEM pry-byebug (3.7.0) byebug (~> 11.0) pry (~> 0.10) - public_suffix (4.0.7) + public_suffix (5.0.4) puma (5.6.7) nio4r (~> 2.0) - racc (1.7.1) + racc (1.7.3) rack (2.2.8) rack-proxy (0.6.5) rack @@ -291,7 +291,7 @@ GEM reform-rails (0.1.7) activemodel (>= 3.2) reform (>= 2.2.0) - regexp_parser (2.6.1) + regexp_parser (2.8.2) representable (3.0.4) declarative (< 0.1.0) declarative-option (< 0.2.0) @@ -299,7 +299,7 @@ GEM responders (3.0.1) actionpack (>= 5.0) railties (>= 5.0) - rexml (3.2.5) + rexml (3.2.6) rspec-core (3.11.0) rspec-support (~> 3.11.0) rspec-expectations (3.11.0) @@ -351,7 +351,7 @@ GEM sprockets (> 3.0) sprockets-rails tilt - selenium-webdriver (4.7.0) + selenium-webdriver (4.15.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -400,11 +400,7 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webdrivers (5.2.0) - nokogiri (~> 1.6) - rubyzip (>= 1.3.0) - selenium-webdriver (~> 4.0) - websocket (1.2.9) + websocket (1.2.10) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) @@ -464,7 +460,6 @@ DEPENDENCIES uglifier (>= 1.3.0) vite_rails (~> 3.0) web-console (>= 3.3.0) - webdrivers whenever RUBY VERSION diff --git a/spec/support/capybara_selenium.rb b/spec/support/capybara_selenium.rb index 66873831..67685c39 100644 --- a/spec/support/capybara_selenium.rb +++ b/spec/support/capybara_selenium.rb @@ -6,14 +6,13 @@ Capybara.server = :puma, { Silent: true } -Capybara.register_driver(:chrome_headless) do |app| - capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( - 'goog:chromeOptions': { args: %w[headless disable-gpu disable-setuid-sandbox window-size=7680,4320] } - ) +Capybara.register_driver(:selenium) do |app| browser_options = ::Selenium::WebDriver::Chrome::Options.new - # browser_options.args << "--headless" + browser_options.args << "--headless" browser_options.args << "--disable-gpu" + browser_options.args << "--disable-setuid-sandbox" + browser_options.args << "--window-size=7680,4320" http_client = Selenium::WebDriver::Remote::Http::Default.new http_client.read_timeout = 120 @@ -21,9 +20,8 @@ Capybara::Selenium::Driver.new(app, browser: :chrome, - capabilities: capabilities, - http_client: http_client, + http_client:, options: browser_options) end -Capybara.javascript_driver = :chrome_headless +Capybara.javascript_driver = :selenium