From 7d7dbb01becb858e00f461bb5af81a8c579a54ad Mon Sep 17 00:00:00 2001 From: Marius BALTEANU Date: Sat, 9 Jan 2021 12:55:44 +0200 Subject: [PATCH] Add 'webdrivers' gem to manage Chromedriver installation --- Gemfile | 1 + doc/RUNNING_TESTS | 4 ++-- test/application_system_test_case.rb | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 5eb62c1e9..b68e79269 100644 --- a/Gemfile +++ b/Gemfile @@ -91,6 +91,7 @@ group :test do gem 'puma' gem 'capybara', '~> 3.31.0' gem "selenium-webdriver" + gem "webdrivers", '~> 4.4', require: false # RuboCop gem 'rubocop', '~> 1.5.2' gem 'rubocop-performance', '~> 1.9.0' diff --git a/doc/RUNNING_TESTS b/doc/RUNNING_TESTS index 38c4389eb..35e271a34 100644 --- a/doc/RUNNING_TESTS +++ b/doc/RUNNING_TESTS @@ -66,8 +66,8 @@ REDMINE_TEST_DAV_SERVER environment variable to specify another host. Running Capybara tests ====================== -You need to have ChromeDriver installed and available in your PATH: -https://sites.google.com/a/chromium.org/chromedriver/ +You need to have Chrome installed and available in your PATH. +Chromedriver is managed by the `webdrivers` gem (https://rubygems.org/gems/webdrivers) Capybara tests can be run with: `rails test:system` diff --git a/test/application_system_test_case.rb b/test/application_system_test_case.rb index 1a1e0cb4a..1b117b274 100644 --- a/test/application_system_test_case.rb +++ b/test/application_system_test_case.rb @@ -18,6 +18,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. require File.expand_path('../test_helper', __FILE__) +require 'webdrivers/chromedriver' class ApplicationSystemTestCase < ActionDispatch::SystemTestCase DOWNLOADS_PATH = File.expand_path(File.join(Rails.root, 'tmp', 'downloads')) -- 2.22.0