Skip to content

Commit

Permalink
Update Selenium etc
Browse files Browse the repository at this point in the history
  • Loading branch information
pablobm committed Nov 24, 2023
1 parent 60aee78 commit 9485e93
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 21 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
11 changes: 3 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ GEM
sprockets-rails
tilt
selectize-rails (0.12.6)
selenium-webdriver (4.9.0)
selenium-webdriver (4.15.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
Expand Down Expand Up @@ -322,16 +322,12 @@ 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)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.8.1)
websocket (1.2.9)
websocket (1.2.10)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
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
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
11 changes: 2 additions & 9 deletions spec/support/webmock.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
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"]

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

0 comments on commit 9485e93

Please sign in to comment.