Skip to content

Commit

Permalink
Update selenium-webdriver and remove webdrivers (#2419)
Browse files Browse the repository at this point in the history
…so that we can use Chromium 115+, per `webdrivers`' recommendation

<https://github.com/titusfortner/webdrivers/tree/v5.3.1#update-future-of-this-project>
  • Loading branch information
thoughtbot-summer authored Dec 12, 2023
1 parent 622ca55 commit c618988
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 23 deletions.
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ group :test do
gem "database_cleaner"
gem "formulaic"
gem "launchy"
gem "selenium-webdriver", "= 4.9.0"
gem "selenium-webdriver"
gem "shoulda-matchers"
gem "timecop"
gem "webdrivers"
gem "webmock"
gem "webrick"
gem "xpath", "3.2.0"
Expand Down
7 changes: 1 addition & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,6 @@ GEM
unicorn (6.1.0)
kgio (~> 2.6)
raindrops (~> 0.7)
webdrivers (5.2.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0)
webmock (3.19.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
Expand Down Expand Up @@ -366,13 +362,12 @@ DEPENDENCIES
pundit
rack-timeout
redcarpet
selenium-webdriver (= 4.9.0)
selenium-webdriver
sentry-raven
shoulda-matchers
timecop
uglifier
unicorn
webdrivers
webmock
webrick
xpath (= 3.2.0)
Expand Down
3 changes: 1 addition & 2 deletions gemfiles/pundit21.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ group :test do
gem "database_cleaner"
gem "formulaic"
gem "launchy"
gem "selenium-webdriver", "= 4.9.0"
gem "selenium-webdriver"
gem "shoulda-matchers"
gem "timecop"
gem "webdrivers"
gem "webmock"
gem "webrick"
gem "xpath", "3.2.0"
Expand Down
3 changes: 1 addition & 2 deletions gemfiles/rails60.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ group :test do
gem "database_cleaner"
gem "formulaic"
gem "launchy"
gem "selenium-webdriver", "= 4.9.0"
gem "selenium-webdriver"
gem "shoulda-matchers"
gem "timecop"
gem "webdrivers"
gem "webmock"
gem "webrick"
gem "xpath", "3.2.0"
Expand Down
3 changes: 1 addition & 2 deletions gemfiles/rails61.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ group :test do
gem "database_cleaner"
gem "formulaic"
gem "launchy"
gem "selenium-webdriver", "= 4.9.0"
gem "selenium-webdriver"
gem "shoulda-matchers"
gem "timecop"
gem "webdrivers"
gem "webmock"
gem "webrick"
gem "xpath", "3.2.0"
Expand Down
3 changes: 1 addition & 2 deletions gemfiles/rails70.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ group :test do
gem "database_cleaner"
gem "formulaic"
gem "launchy"
gem "selenium-webdriver", "= 4.9.0"
gem "selenium-webdriver"
gem "shoulda-matchers"
gem "timecop"
gem "webdrivers"
gem "webmock"
gem "webrick"
gem "xpath", "3.2.0"
Expand Down
2 changes: 0 additions & 2 deletions spec/support/webdrivers.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
require "selenium/webdriver"

Webdrivers::Chromedriver.required_version = "114.0.5735.90"

Capybara.register_driver :chrome do |app|
Capybara::Selenium::Driver.new(app, browser: :chrome)
end
Expand Down
6 changes: 1 addition & 5 deletions spec/support/webmock.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
require "webmock/rspec"

# Allow downloading webdrivers for Selenium
driver_hosts = Webdrivers::Common.subclasses.
map { |driver| URI(driver.base_url).host }

# Downloading the Firefox driver involves a redirect
driver_hosts += ["github-releases.githubusercontent.com"]
driver_hosts = ["github-releases.githubusercontent.com"]

# Additionally, avoid conflict with Selenium (localhost)
WebMock.disable_net_connect!(allow_localhost: true, allow: driver_hosts)

0 comments on commit c618988

Please sign in to comment.