Project

General

Profile

Actions

Defect #31657

closed

Update capybara (~> 3.25.0)

Defect #31657: Update capybara (~> 3.25.0)

Added by Takenori TAKAKI over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Gems support
Target version:
Resolution:
Fixed
Affected version:

Description

I got the following warning while testing test/system.
This is caused by a version of capybara in Gemfile ('~> 2.13').

$ rake test TEST=test/system
 :
WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::UnhandledError is deprecated. Use Selenium::WebDriver::Error::UnknownError (ensure the driver supports W3C WebDriver specification) instead.
WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::ElementNotVisibleError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
 :

From the above, How about removing Capybara's version?

diff --git a/Gemfile b/Gemfile
index 37449f09f..3a5212e26 100644
--- a/Gemfile
+++ b/Gemfile
@@ -81,7 +81,7 @@ group :test do
   gem "ffi", platforms: [:mingw, :x64_mingw, :mswin]
   # For running system tests
   gem 'puma', '~> 3.7'
-  gem "capybara", '~> 2.13'
+  gem "capybara" 
   gem "selenium-webdriver" 
   # RuboCop
   gem 'rubocop', '~> 0.72.0'


Files


Related issues 1 (0 open — 1 closed)

Copied to Redmine - Patch #32453: Update capybara (~> 3.31.0)ClosedGo MAEDAActions

Updated by Go MAEDA over 7 years ago Actions #1

  • Subject changed from DEPRECATION WARNING: Selenium::WebDriver::Error::***Error is deprecated. to Update capybara (~> 3.25.0)
  • Category set to Gems support
  • Target version set to 4.1.0

Thank you for reporting this issue.

I think it is better to pin the version to the tested one. Unintended update of gems may break test.

diff --git a/Gemfile b/Gemfile
index 37449f09f..9aa6e66f5 100644
--- a/Gemfile
+++ b/Gemfile
@@ -81,7 +81,7 @@ group :test do
   gem "ffi", platforms: [:mingw, :x64_mingw, :mswin]
   # For running system tests
   gem 'puma', '~> 3.7'
-  gem "capybara", '~> 2.13'
+  gem "capybara", '~> 3.25.0'
   gem "selenium-webdriver" 
   # RuboCop
   gem 'rubocop', '~> 0.72.0'

Updated by Takenori TAKAKI over 7 years ago Actions #2

Thank you for your comment Mr. Maeda.

Go MAEDA wrote:

I think it is better to pin the version to the tested one. Unintended update of gems may break test.

I have the same opinion as you.
When I ran the test, I needed to fix the test code.
So I posted the patch again.

Updated by Go MAEDA over 7 years ago Actions #3

IssuesTest#test_issue_trackers_description_should_select_tracker randomly fails.

.........................[Screenshot]: tmp/screenshots/failures_test_issue_trackers_description_should_select_tracker.png
F

Failure:
IssuesTest#test_issue_trackers_description_should_select_tracker [/Users/maeda/redmines/redmine-trunk/test/system/issues_test.rb:350]:
Expected false to be truthy.

bin/rails test test/system/issues_test.rb:344

Updated by Go MAEDA over 7 years ago Actions #5

Pavel Rosický wrote:

Go MAEDA it fails because of scroll animations https://github.com/redmine/redmine/blob/master/public/javascripts/application.js#L28

No errors are observed after applying your patch. Thanks.

Updated by Go MAEDA over 7 years ago Actions #6

  • Subject changed from Update capybara (~> 3.25.0) to Update capybara (~> 3.15.1)

Capybara 3.25.0 cannot be used because Redmine 4.1.0 supports Ruby 2.3 but Capybara 3.25.0 does not. The last version of Capybara which supports Ruby 2.3 is 3.15.1.

Updated by Go MAEDA over 7 years ago Actions #7

  • Subject changed from Update capybara (~> 3.15.1) to Update capybara (~> 3.25.0)
Index: Gemfile
===================================================================
--- Gemfile    (revision 18329)
+++ Gemfile    (working copy)
@@ -81,7 +81,7 @@
   gem "ffi", platforms: [:mingw, :x64_mingw, :mswin]
   # For running system tests
   gem 'puma', '~> 3.7'
-  gem "capybara", '~> 2.13'
+  gem "capybara", (RUBY_VERSION < "2.4" ? "~> 3.15.1" : "~> 3.25.0")
   gem "selenium-webdriver" 
   # RuboCop
   gem 'rubocop', '~> 0.72.0'

Updated by Go MAEDA over 7 years ago Actions #8

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you.

Updated by Takenori TAKAKI about 7 years ago Actions #9

  • Status changed from Closed to Reopened

The latest version of Capybara (3.29.0) has been released, so I updated the gem and re-tested the "test/system".
And I confirmed that all tests passed.

index 587bdb101..1d7c8fe1c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -81,7 +81,7 @@ group :test do
   gem "ffi", platforms: [:mingw, :x64_mingw, :mswin]
   # For running system tests
   gem 'puma', '~> 3.7'
-  gem "capybara", (RUBY_VERSION < "2.4" ? "~> 3.15.1" : "~> 3.25.0")
+  gem "capybara", (RUBY_VERSION < "2.4" ? "~> 3.15.1" : "~> 3.29.0")
   gem "selenium-webdriver" 
   # RuboCop
   gem 'rubocop', '~> 0.76.0'

Updated by Go MAEDA about 7 years ago Actions #10

Updated by Go MAEDA about 7 years ago Actions #11

  • Status changed from Reopened to Closed

Takenori TAKAKI wrote:

The latest version of Capybara (3.29.0) has been released, so I updated the gem and re-tested the "test/system".
And I confirmed that all tests passed.

Thank you for testing the latest version of Capybara. But 4.1-stable branch has been created and Redmine 4.1.0 is about to be released, so I have opened a new issue #32453 for Redmine 4.2.0.

Actions

Also available in: PDF Atom