Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Replace deprecated chromedriver-helper with webdrivers

Oliver Günther569c70aa1893
diff --git a/.travis.yml b/.travis.yml
index d30fcd45f51..cccef3d8da0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,7 +32,7 @@ rvm:
- 2.6.1
sudo: required
-dist: trusty
+dist: xenial
cache:
bundler: true
diff --git a/Gemfile b/Gemfile
index 15438ff3ef6..a4fc0257c7f 100644
--- a/Gemfile
+++ b/Gemfile
@@ -222,7 +222,7 @@ group :test do
gem 'capybara', '~> 3.13.0'
gem 'capybara-screenshot', '~> 1.0.17'
gem 'capybara-select2', git: 'https://github.com/goodwill/capybara-select2', ref: '585192e'
- gem 'chromedriver-helper', '~> 2.1.0'
+ gem 'webdrivers', '~> 4.1.2', require: false
gem 'selenium-webdriver', '~> 3.14'
gem 'fuubar', '~> 2.3.2'
diff --git a/Gemfile.lock b/Gemfile.lock
index 91064cec483..8f7e0b6982f 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -318,8 +318,6 @@ GEM
airbrake-ruby (~> 3.0)
airbrake-ruby (3.1.0)
tdigest (= 0.1.1)
- archive-zip (0.11.0)
- io-like (~> 0.3.0)
arel (9.0.0)
ast (2.4.0)
attr_required (1.0.1)
@@ -388,9 +386,6 @@ GEM
cells (>= 4.1.6, < 5.0.0)
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
- chromedriver-helper (2.1.0)
- archive-zip (~> 0.10)
- nokogiri (~> 1.8)
claide (1.0.3)
claide-plugins (0.9.2)
cork
@@ -561,7 +556,6 @@ GEM
ice_cube (0.16.3)
ice_nine (0.11.2)
interception (0.5)
- io-like (0.3.0)
ipaddress (0.8.3)
iso8601 (0.12.1)
jaro_winkler (1.5.2)
@@ -936,6 +930,10 @@ GEM
rack (>= 2.0.6)
warden-basic_auth (0.2.1)
warden (~> 1.2)
+ webdrivers (4.1.2)
+ nokogiri (~> 1.6)
+ rubyzip (~> 1.0)
+ selenium-webdriver (>= 3.0, < 4.0)
webfinger (1.1.0)
activesupport
httpclient (>= 2.4)
@@ -978,7 +976,6 @@ DEPENDENCIES
carrierwave (~> 1.3.1)
cells-erb (~> 0.1.0)
cells-rails (~> 0.0.9)
- chromedriver-helper (~> 2.1.0)
commonmarker (~> 0.20.1)
cucumber (~> 3.1.0)
cucumber-rails (~> 1.6.0)
@@ -1113,6 +1110,7 @@ DEPENDENCIES
unicorn-worker-killer
warden (~> 1.2)
warden-basic_auth (~> 0.2.1)
+ webdrivers (~> 4.1.2)
webmock (~> 3.5.0)
will_paginate (~> 3.1.7)
diff --git a/spec/support/browsers/chrome.rb b/spec/support/browsers/chrome.rb
index 5fdfe81cae9..931db2373ca 100644
--- a/spec/support/browsers/chrome.rb
+++ b/spec/support/browsers/chrome.rb
@@ -1,5 +1,10 @@
-# Force the latest version of chromedriver using the chromedriver-helper gem
-Chromedriver.set_version "2.44"
+# Force the latest version of chromedriver using the webdriver gem
+require 'webdrivers/chromedriver'
+
+if ENV['CI']
+ ::Webdrivers.logger.level = :DEBUG
+ ::Webdrivers::Chromedriver.update
+end
def register_chrome_headless(language)
name = :"chrome_headless_#{language}"
diff --git a/spec/support/pages/groups.rb b/spec/support/pages/groups.rb
index d6462339ff8..440c2f538f6 100644
--- a/spec/support/pages/groups.rb
+++ b/spec/support/pages/groups.rb
@@ -27,6 +27,7 @@
#++
require 'support/pages/page'
+require 'support/components/ng_select_autocomplete_helpers'
module Pages
class Groups < Page