Project

General

Profile

Actions

Defect #42687

closed

Fix random failures in several system tests with Chrome 133 and later

Added by Katsuya HIDAKA 2 days ago. Updated about 5 hours ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

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

Actions #1

Updated by Erica Den 2 days 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.

Actions #2

Updated by Go MAEDA 2 days ago

  • Target version set to 5.1.9

Setting the target version to 5.1.9.

Actions #3

Updated by Go MAEDA 1 day ago

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

Committed the patch in r23756. Thank you.

Actions #4

Updated by Go MAEDA about 5 hours ago

  • Status changed from Resolved to Closed

Merged the fix into the stable branches in r23758 and r23760.

Actions

Also available in: Atom PDF