プロジェクト

全般

プロフィール

Vote #80170

完了

Update capybara (~> 3.25.0)

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Gems support_45
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
45
version_id:
127
issue_org_id:
31657
author_id:
145727
assigned_to_id:
332
comments:
11
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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'

journals

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.

<pre><code class="diff">
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'
</code></pre>
--------------------------------------------------------------------------------
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.

--------------------------------------------------------------------------------
IssuesTest#test_issue_trackers_description_should_select_tracker randomly fails.

<pre>
.........................[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
</pre>
--------------------------------------------------------------------------------
Go MAEDA it fails because of scroll animations https://github.com/redmine/redmine/blob/master/public/javascripts/application.js#L28
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
<pre><code class="diff">
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'
</code></pre>
--------------------------------------------------------------------------------
Committed the patch. Thank you.
--------------------------------------------------------------------------------
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.

<pre><code class="diff">
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'
</code></pre>
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
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.

--------------------------------------------------------------------------------


related_issues

copied_to,Closed,32453,Update capybara (~> 3.31.0)

Admin Redmine さんが3年以上前に更新

  • カテゴリGems support_45 にセット
  • 対象バージョン4.1.0_127 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0