From f0595bcd4e9b79133710dbba1a7b937f4400ebfc Mon Sep 17 00:00:00 2001 From: Peter Berkenbosch Date: Sun, 7 Jun 2020 14:24:29 +0200 Subject: [PATCH] Add webdrivers gem When running the feature specs locally with a recent Chrome version the selenium webdriver fails with an error that Chrome has to be in a certain version. Adding the webdrivers gem and require this in the frontend gem fixes this. --- Gemfile | 1 + backend/spec/spec_helper.rb | 1 + backend/spec/teaspoon_env.rb | 1 + frontend/spec/spec_helper.rb | 1 + 4 files changed, 4 insertions(+) diff --git a/Gemfile b/Gemfile index 77722f7957..8841d74221 100644 --- a/Gemfile +++ b/Gemfile @@ -49,6 +49,7 @@ group :backend, :frontend do gem 'capybara', '~> 3.13', require: false gem 'capybara-screenshot', '>= 1.0.18', require: false gem 'selenium-webdriver', require: false + gem 'webdrivers', require: false end group :frontend do diff --git a/backend/spec/spec_helper.rb b/backend/spec/spec_helper.rb index 1c33a09356..6ae521df14 100644 --- a/backend/spec/spec_helper.rb +++ b/backend/spec/spec_helper.rb @@ -44,6 +44,7 @@ Capybara.exact = true require "selenium/webdriver" +require 'webdrivers' Capybara.register_driver :selenium_chrome_headless do |app| browser_options = ::Selenium::WebDriver::Chrome::Options.new diff --git a/backend/spec/teaspoon_env.rb b/backend/spec/teaspoon_env.rb index 803f98dd76..dbf2fe8deb 100644 --- a/backend/spec/teaspoon_env.rb +++ b/backend/spec/teaspoon_env.rb @@ -3,6 +3,7 @@ ENV['RAILS_ENV'] = 'test' require 'teaspoon/driver/selenium' +require 'webdrivers' # Similar to setup described in # https://github.com/jejacks0n/teaspoon/wiki/Micro-Applications diff --git a/frontend/spec/spec_helper.rb b/frontend/spec/spec_helper.rb index b9fabb652b..1e2d0ceaa4 100644 --- a/frontend/spec/spec_helper.rb +++ b/frontend/spec/spec_helper.rb @@ -44,6 +44,7 @@ Capybara.default_max_wait_time = ENV['DEFAULT_MAX_WAIT_TIME'].to_f if ENV['DEFAULT_MAX_WAIT_TIME'].present? require "selenium/webdriver" +require 'webdrivers' Capybara.javascript_driver = (ENV['CAPYBARA_DRIVER'] || :selenium_chrome_headless).to_sym ActiveJob::Base.queue_adapter = :test