diff --git a/Gemfile b/Gemfile index 13763e699..1d23d00d8 100644 --- a/Gemfile +++ b/Gemfile @@ -93,6 +93,7 @@ group :test do gem 'shoulda-matchers', require: false gem 'timecop' gem 'vcr' + gem 'webdrivers', '~> 4.0' gem 'webmock' end diff --git a/Gemfile.lock b/Gemfile.lock index 7eaa820eb..969792790 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -678,6 +678,10 @@ GEM activemodel (>= 5.0) bindex (>= 0.4.0) railties (>= 5.0) + webdrivers (4.1.3) + nokogiri (~> 1.6) + rubyzip (>= 1.3.0) + selenium-webdriver (>= 3.0, < 4.0) webfinger (1.1.0) activesupport httpclient (>= 2.4) @@ -812,6 +816,7 @@ DEPENDENCIES vcr warden web-console + webdrivers (~> 4.0) webmock webpacker xray-rails diff --git a/bin/setup b/bin/setup index 3d592bcd5..34110e498 100755 --- a/bin/setup +++ b/bin/setup @@ -18,6 +18,8 @@ chdir APP_ROOT do system('bundle check') || system!('bundle install') system! 'bin/yarn install' + puts "\n== Updating webdrivers ==" + system! 'RAILS_ENV=test bin/rails webdrivers:chromedriver:update' puts "\n== Copying sample files ==" unless File.exist?('.env') diff --git a/bin/update b/bin/update index c1968201d..04eb642c5 100755 --- a/bin/update +++ b/bin/update @@ -18,6 +18,9 @@ chdir APP_ROOT do system('bundle check') || system!('bundle install') system! 'bin/yarn install' + puts "\n== Updating webdrivers ==" + system! 'RAILS_ENV=test bin/rails webdrivers:chromedriver:update' + puts "\n== Updating database ==" system! 'bin/rails db:migrate' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index dd0af845a..655686eb2 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -83,7 +83,7 @@ VCR.configure do |c| c.hook_into :webmock c.cassette_library_dir = 'spec/fixtures/cassettes' c.configure_rspec_metadata! - c.ignore_hosts 'test.host' + c.ignore_hosts 'test.host', 'chromedriver.storage.googleapis.com' end DatabaseCleaner.strategy = :transaction