Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Commit

Permalink
WIP add driver path
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardkerry committed Apr 30, 2019
1 parent d003b09 commit 1644db9
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,22 @@
require "capybara-select2"
require "faker"
require "plek"
require 'webdrivers'
require "selenium-webdriver"

Dir["./spec/support/*.rb"].each { |f| require f }

unless ENV['GOVUK_TEST_USE_SYSTEM_CHROMEDRIVER']
require 'webdrivers'

# This stop webdrivers doing a lazy check for new versions
# of chromedriver, which interferes with WebMock.disable_net_connect
if ::Selenium::WebDriver::Service.respond_to? :driver_path=
Selenium::WebDriver::Chrome::Service.driver_path = Webdrivers::Chromedriver.update
else
Selenium::WebDriver::Chrome.driver_path = Webdrivers::Chromedriver.update
end
end

RSpec.configure do |config|
# rspec-expectations config goes here. You can use an alternate
# assertion/expectation library such as wrong or the stdlib/minitest
Expand Down Expand Up @@ -115,7 +127,6 @@
config.add_setting :reload_page_wait_time, default: 60
end


Capybara.register_driver :headless_chrome do |app|
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
acceptInsecureCerts: true,
Expand Down

0 comments on commit 1644db9

Please sign in to comment.