Skip to content

Commit

Permalink
Try upgrading webdrivers
Browse files Browse the repository at this point in the history
  • Loading branch information
tf committed Aug 15, 2023
1 parent 00191a7 commit 0a9bdaa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
3 changes: 1 addition & 2 deletions pageflow.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'puma', '~> 3.12'

# Chrome Headless browser testing
s.add_development_dependency 'selenium-webdriver', '~> 3.6.x'
s.add_development_dependency 'webdrivers', '~> 4.0'
s.add_development_dependency 'webdrivers', '= 5.3.0'

# View abstraction fro integration testing
s.add_development_dependency 'domino', '~> 0.7.0'
Expand Down
4 changes: 2 additions & 2 deletions spec/support/pageflow/support/config/capybara.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
# (see https://docs.travis-ci.com/user/chrome)
browser_options.args << '--no-sandbox'

capabilities = {
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
# see https://github.com/SeleniumHQ/selenium/issues/3738
loggingPrefs: {browser: 'ALL'},
# see https://github.com/dbalatero/capybara-chromedriver-logger/issues/11
chromeOptions: {
w3c: false
}
}
)

Capybara::Selenium::Driver.new(app,
browser: :chrome,
Expand Down
9 changes: 8 additions & 1 deletion spec/support/pageflow/support/config/webmock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
RSpec.configure do |config|
config.before(:each) do
driver_urls = Webdrivers::Common.subclasses.map(&:base_url)
WebMock.disable_net_connect!(allow_localhost: true, allow: driver_urls)
WebMock.disable_net_connect!(
allow_localhost: true,
allow: [
*driver_urls,
'https://googlechromelabs.github.io',
'https://edgedl.me.gvt1.com'
]
)
end
end

0 comments on commit 0a9bdaa

Please sign in to comment.