Skip to content

Commit

Permalink
update to chromedriver 119.x.x.x, adjust whitelist URLs in features/s…
Browse files Browse the repository at this point in the history
…upport/webmock.rb to allow capybara to query webdriver version etc
  • Loading branch information
armandofox committed Nov 30, 2023
1 parent c79dc52 commit d23d483
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ group :test do
gem 'email_spec'
gem 'faker'
gem 'fake_stripe'
gem 'webdrivers','~> 5.0', require: false
gem 'webdrivers','>= 5.2.0', require: false
gem 'rspec-json_expectations'
gem 'simplecov'
gem 'timecop'
Expand Down
24 changes: 12 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ GEM
xpath (~> 3.2)
celluloid (0.16.0)
timers (~> 4.0.0)
childprocess (4.1.0)
chronic (0.10.2)
coderay (1.1.2)
concurrent-ruby (1.1.5)
Expand Down Expand Up @@ -171,16 +170,16 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2019.0331)
mini_mime (1.0.2)
mini_portile2 (2.8.1)
mini_portile2 (2.8.5)
minitest (5.14.0)
moneta (1.0.0)
multi_json (1.13.1)
multi_test (0.1.2)
multipart-post (2.0.0)
newrelic_rpm (5.0.0.342)
nio4r (2.5.8)
nokogiri (1.14.2)
mini_portile2 (~> 2.8.0)
nokogiri (1.15.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
parallel (1.12.1)
parser (3.2.2.0)
Expand All @@ -200,7 +199,7 @@ GEM
nio4r (~> 2.0)
puma-heroku (2.0.0)
puma (>= 5.0, < 6.0)
racc (1.6.2)
racc (1.7.3)
rack (1.6.12)
rack-protection (1.5.5)
rack
Expand Down Expand Up @@ -245,7 +244,7 @@ GEM
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
rexml (3.2.5)
rexml (3.2.6)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
Expand Down Expand Up @@ -292,10 +291,10 @@ GEM
tilt
scout_apm (5.3.3)
parser
selenium-webdriver (4.1.0)
childprocess (>= 0.5, < 5.0)
selenium-webdriver (4.9.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
simplecov (0.17.0)
docile (~> 1.1)
json (>= 1.8, < 3)
Expand Down Expand Up @@ -336,15 +335,16 @@ GEM
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
webdrivers (5.0.0)
webdrivers (5.3.1)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0)
selenium-webdriver (~> 4.0, < 4.11)
webmock (3.10.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.6.1)
websocket (1.2.10)
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
Expand Down Expand Up @@ -417,7 +417,7 @@ DEPENDENCIES
uglifier
vcr
web-console (~> 2.0)
webdrivers (~> 5.0)
webdrivers (>= 5.2.0)
webmock
where-or
will_paginate
Expand Down
5 changes: 3 additions & 2 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@
Capybara.default_selector = :css
Capybara.server = :webrick
Capybara.register_driver :selenium do |app|
Webdrivers::Chromedriver.required_version = '114.0.5735.90'
Webdrivers::Chromedriver.required_version = '119.0.6045.105'
webdriver_args = %w[--headless --no-sandbox --disable-gpu --window-size=1024,1024]
options = Selenium::WebDriver::Chrome::Options.new(
args: %w[--headless --no-sandbox --disable-gpu --window-size=1024,1024]
args: webdriver_args
)
# When an "unexpected" alert/confirm is displayed, accept it (ie user clicks OK).
# Expected ones can be handled with accept_alert do...end or accept_confirm do...end
Expand Down
6 changes: 5 additions & 1 deletion features/support/webmock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
WebMock.disable_net_connect!(
net_http_connect_on_start: true, # @see https://github.com/bblimke/webmock/blob/master/README.md#connecting-on-nethttpstart
allow_localhost: true,
allow: "chromedriver.storage.googleapis.com")
# 186585553: When upgrade to Ruby3.0, stop requiring webdrivers gem, upgrade to Selenium 4.11+,
# and hopefully remove the whitelist URIs below
allow: ["googlechromelabs.github.io", 'edgedl.me.gvt1.com']
)

0 comments on commit d23d483

Please sign in to comment.