Defect #42687
closedFix random failures in several system tests with Chrome 133 and later
0%
Description
Since recently, some system tests in Redmine have started to fail randomly. This patch addresses that issue.
Failure: IssuesSystemTest#test_create_issue_with_attachment_when_user_is_not_a_member [test/test_helper.rb:231]: "Issue.count" didn't change by 1, but by 0. Expected: 15 Actual: 14 bin/rails test test/system/issues_test.rb:149 Failure: IssuesSystemTest#test_create_issue_with_attachment [test/test_helper.rb:231]: "Issue.count" didn't change by 1, but by 0. Expected: 15 Actual: 14 bin/rails test test/system/issues_test.rb:134 Failure: IssuesSystemTest#test_update_issue_with_form_update_should_keep_newly_added_attachments [test/system/issues_test.rb:270]: Expected: 3 Actual: 2 ...
These failures appear to have started with Chrome 133 and later. The root cause is that the tests verify outcomes before the tested operations—such as issue creation—are fully completed. This patch adds assertions to ensure the operations are finished before verification.
A similar issue, where tests fail due to the changes in Chrome 133 and later, has been reported here:
https://github.com/teamcapybara/capybara/issues/2800
With this fix and the fix from #42422, I have confirmed that all system tests pass with the latest version of Chrome.
Files
Updated by Anonymous about 2 months ago
It sounds like Chrome 133 and later introduced changes that caused tests to fail due to premature verification of operations. Your patch ensures that assertions are in place to confirm operations—like issue creation—are fully completed before verification, resolving the problem.
Updated by Go MAEDA about 2 months ago
- Target version set to 5.1.9
Setting the target version to 5.1.9.
Updated by Go MAEDA about 1 month ago
- Status changed from New to Resolved
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the patch in r23756. Thank you.