Project

General

Profile

Actions

Patch #42756

closed

Update tests for rails-dom-testing 2.3.0 whitespace collapsing

Added by Katsuya HIDAKA 3 days ago. Updated 2 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

rails-dom-testing 2.3.0 and later collapse whitespace in assert_select :text , causing some tests to fail if they expect multiple spaces or tabs.

https://github.com/hidakatsuya/redmine/actions/runs/15154438331/job/42621433335

Failure:
IssuesControllerTest#test_index_with_last_notes_column [test/functional/issues_controller_test.rb:1738]:
--- expected
+++ actual
@@ -1 +1 @@
-"A comment with inline image:  and a reference to #1 and r2." 
+"A comment with inline image: and a reference to #1 and r2." 
.
Expected 0 to be >= 1.

bin/rails test test/functional/issues_controller_test.rb:1725
...

This patch updates the affected tests to expect collapsed whitespace.
It also sets the minimum required version of rails-dom-testing to 2.3.0, since the updated tests fail on earlier versions.

Confirmed that the tests pass on both master and 5.1-stable.


Files

Actions

Also available in: Atom PDF