Use webdrivers gem to keep webdrivers updated

This commit is contained in:
Paul Chavard 2019-11-05 15:47:55 +01:00
parent 88a4befbc5
commit efd03f0169
5 changed files with 12 additions and 1 deletions

View file

@ -93,6 +93,7 @@ group :test do
gem 'shoulda-matchers', require: false gem 'shoulda-matchers', require: false
gem 'timecop' gem 'timecop'
gem 'vcr' gem 'vcr'
gem 'webdrivers', '~> 4.0'
gem 'webmock' gem 'webmock'
end end

View file

@ -678,6 +678,10 @@ GEM
activemodel (>= 5.0) activemodel (>= 5.0)
bindex (>= 0.4.0) bindex (>= 0.4.0)
railties (>= 5.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) webfinger (1.1.0)
activesupport activesupport
httpclient (>= 2.4) httpclient (>= 2.4)
@ -812,6 +816,7 @@ DEPENDENCIES
vcr vcr
warden warden
web-console web-console
webdrivers (~> 4.0)
webmock webmock
webpacker webpacker
xray-rails xray-rails

View file

@ -18,6 +18,8 @@ chdir APP_ROOT do
system('bundle check') || system!('bundle install') system('bundle check') || system!('bundle install')
system! 'bin/yarn install' system! 'bin/yarn install'
puts "\n== Updating webdrivers =="
system! 'RAILS_ENV=test bin/rails webdrivers:chromedriver:update'
puts "\n== Copying sample files ==" puts "\n== Copying sample files =="
unless File.exist?('.env') unless File.exist?('.env')

View file

@ -18,6 +18,9 @@ chdir APP_ROOT do
system('bundle check') || system!('bundle install') system('bundle check') || system!('bundle install')
system! 'bin/yarn install' system! 'bin/yarn install'
puts "\n== Updating webdrivers =="
system! 'RAILS_ENV=test bin/rails webdrivers:chromedriver:update'
puts "\n== Updating database ==" puts "\n== Updating database =="
system! 'bin/rails db:migrate' system! 'bin/rails db:migrate'

View file

@ -83,7 +83,7 @@ VCR.configure do |c|
c.hook_into :webmock c.hook_into :webmock
c.cassette_library_dir = 'spec/fixtures/cassettes' c.cassette_library_dir = 'spec/fixtures/cassettes'
c.configure_rspec_metadata! c.configure_rspec_metadata!
c.ignore_hosts 'test.host' c.ignore_hosts 'test.host', 'chromedriver.storage.googleapis.com'
end end
DatabaseCleaner.strategy = :transaction DatabaseCleaner.strategy = :transaction