From 634e80bee8d223efc058a08077ec38c5e3c96958 Mon Sep 17 00:00:00 2001 From: ulferts Date: Fri, 2 Jun 2017 08:47:56 +0200 Subject: [PATCH] bump webdriver - disable marionette (#5559) [ci skip] --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- features/support/env.rb | 10 ++++++++-- spec/support/capybara.rb | 4 +++- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index 0838c245992..cc27beb4ec5 100644 --- a/Gemfile +++ b/Gemfile @@ -197,7 +197,7 @@ group :test do gem 'fuubar', '~> 2.2.0' gem 'capybara-select2', git: 'https://github.com/goodwill/capybara-select2', ref: '585192e' gem 'capybara-ng', '~> 0.2.7' - gem 'selenium-webdriver', '~> 2.53.4' + gem 'selenium-webdriver', '~> 3.4' gem 'timecop', '~> 0.8.1' gem 'webmock', '~> 3.0.0', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 3dd34f3bdbe..b8d65e7cc1a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -213,7 +213,7 @@ GEM cells-rails (0.0.6) actionpack (>= 3.0) cells (>= 4.1) - childprocess (0.5.9) + childprocess (0.7.0) ffi (~> 1.0, >= 1.0.11) climate_control (0.0.3) activesupport (>= 3.0) @@ -535,7 +535,7 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - selenium-webdriver (2.53.4) + selenium-webdriver (3.4.0) childprocess (~> 0.5) rubyzip (~> 1.0) websocket (~> 1.0) @@ -598,7 +598,7 @@ GEM addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff - websocket (1.2.3) + websocket (1.2.4) websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) @@ -709,7 +709,7 @@ DEPENDENCIES rubytree! sass (= 3.5.0.pre.rc.1) sass-rails (~> 5.0.6) - selenium-webdriver (~> 2.53.4) + selenium-webdriver (~> 3.4) shoulda-context (~> 1.2) shoulda-matchers (~> 3.1) simplecov (~> 0.12.0) diff --git a/features/support/env.rb b/features/support/env.rb index 6b4565b2f59..50320b0fb02 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1,4 +1,5 @@ #-- encoding: UTF-8 + #-- copyright # OpenProject is a project management system. # Copyright (C) 2012-2017 the OpenProject Foundation (OPF) @@ -77,14 +78,19 @@ end Capybara.register_driver :selenium do |app| require 'selenium/webdriver' Selenium::WebDriver::Firefox::Binary.path = ENV['FIREFOX_BINARY_PATH'] || - Selenium::WebDriver::Firefox::Binary.path + Selenium::WebDriver::Firefox::Binary.path profile = Selenium::WebDriver::Firefox::Profile.new profile['intl.accept_languages'] = 'en,en-us' profile['browser.startup.homepage_override.mstone'] = 'ignore' profile['startup.homepage_welcome_url.additional'] = 'about:blank' - Capybara::Selenium::Driver.new(app, browser: :firefox, profile: profile) + # need to disable marionette as noted + # https://github.com/teamcapybara/capybara#capybara + Capybara::Selenium::Driver.new(app, + browser: :firefox, + profile: profile, + desired_capabilities: Selenium::WebDriver::Remote::Capabilities.firefox(marionette: false)) end Capybara.javascript_driver = :selenium diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb index 18fc9f0e2c2..c77d8758243 100644 --- a/spec/support/capybara.rb +++ b/spec/support/capybara.rb @@ -42,7 +42,9 @@ Capybara.register_driver :selenium do |app| Selenium::WebDriver::Firefox::Binary.path = ENV['FIREFOX_BINARY_PATH'] || Selenium::WebDriver::Firefox::Binary.path - capabilities = Selenium::WebDriver::Remote::Capabilities.internet_explorer + # need to disable marionette as noted + # https://github.com/teamcapybara/capybara#capybara + capabilities = Selenium::WebDriver::Remote::Capabilities.firefox(marionette: false) capabilities["elementScrollBehavior"] = 1 client = Selenium::WebDriver::Remote::Http::Default.new