Defect #33181

IssuesSystemTest#test_index_as_csv_should_reflect_sort fails

Added by Go MAEDA 2 months ago. Updated 2 months ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Affected version:4.1.0


IssuesSystemTest#test_index_as_csv_should_reflect_sort fails in trunk or 4.1-stable.

$ bin/rails test test/system/issues_test.rb
Run options: --seed 47671

# Running:

Capybara starting Puma...
* Version 3.12.2 , codename: Llamas in Pajamas
* Min threads: 0, max threads: 4
* Listening on tcp://
[Screenshot]: tmp/screenshots/failures_test_index_as_csv_should_reflect_sort.png

IssuesSystemTest#test_index_as_csv_should_reflect_sort [/Users/maeda/redmines/4.1-stable/test/system/issues_test.rb:365]:
--- expected
+++ actual
@@ -1 +1 @@
-["Add ingredients categories", "Blocked Issue", "Cannot print recipes", "Error 281 when updating a recipe", "Issue Doing the Blocking", "Issue due today", "Issue of a private subproject", "Private issue on public project", "Subproject issue", "Subproject issue two", "Subtask", "The quick brown fox jumps over the lazy dog", "test"]
+["test", "Subtask", "The quick brown fox jumps over the lazy dog", "Private issue on public project", "Issue Doing the Blocking", "Blocked Issue", "Issue due today", "Add ingredients categories", "Subproject issue two", "Issue of a private subproject", "Subproject issue", "Error 281 when updating a recipe", "Cannot print recipes"]

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


#1 Updated by Yuichi HARADA 2 months ago

The cause is probably that the file with the same name already exists at the download destination, and the download itself has not finished yet.
Depending on the test environment, a short wait will resolve the problem.

diff --git a/test/system/issues_test.rb b/test/system/issues_test.rb
index 8352a792f..4eda9184a 100644
--- a/test/system/issues_test.rb
+++ b/test/system/issues_test.rb
@@ -359,6 +359,7 @@ class IssuesSystemTest < ApplicationSystemTestCase

     # if issues.csv exists, Chrome creates issues (1).csv, issues (2).csv ...
+    sleep 0.2
     csv ="issues*.csv"))
     subject_index = csv.shift.index('Subject')
     subjects = {|row| row[subject_index]}

Also available in: Atom PDF