Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Autofix Details
Bugbot Autofix prepared fixes for both issues found in the latest run.
- ✅ Fixed: Options-based
retriesnever applied to Mocha testssystemTests.it()now applies the configured retry count by callingthis.retries(options.retries)inside the generated Mocha test callback.
- ✅ Fixed: Accumulated counter makes retries always fail after first attempt
- The service worker request counter is reset at the start of
onRun, so each retry attempt validates against a fresh counter value.
- The service worker request counter is reset at the start of
Or push these changes by commenting:
@cursor push 364f2ac9c7
Preview (364f2ac9c7)
diff --git a/system-tests/lib/system-tests.ts b/system-tests/lib/system-tests.ts
--- a/system-tests/lib/system-tests.ts
+++ b/system-tests/lib/system-tests.ts
@@ -537,6 +537,8 @@
const testTitle = `${title} [${browser}]`
return mochaItFn(testTitle, function () {
+ this.retries(options.retries)
+
if (options.useSeparateBrowserSnapshots) {
title = testTitle
}
diff --git a/system-tests/test/service_worker_spec.js b/system-tests/test/service_worker_spec.js
--- a/system-tests/test/service_worker_spec.js
+++ b/system-tests/test/service_worker_spec.js
@@ -49,6 +49,7 @@
spec: 'service_worker.cy.js',
retries: 10,
onRun: async (exec, browser) => {
+ requestsForServiceWorkerCache = 0
await exec()
// Ensure that we only called this once even though we loaded the
// service worker twiceThis Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
cypress
|
||||||||||||||||||||||||||||||||||||||||
| Project |
cypress
|
| Branch Review |
mschile/retry_system_tests
|
| Run status |
|
| Run duration | 18m 33s |
| Commit |
|
| Committer | Matthew Schile |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
11
|
|
|
1112
|
|
|
0
|
|
|
27193
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
61.84%
|
|
|---|---|
|
|
27
|
|
|
47
|
Accessibility
98.98%
|
|
|---|---|
|
|
0 critical
3 serious
1 moderate
0 minor
|
|
|
19
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| const testTitle = `${title} [${browser}]` | ||
|
|
||
| return mochaItFn(testTitle, function () { | ||
| this.retries(options.retries) |
There was a problem hiding this comment.
Default retries overrides suite-level Mocha retry inheritance
Low Severity
The retries: 0 default in DEFAULT_OPTIONS causes this.retries(0) to be called unconditionally for every systemTests.it() test. In Mocha, explicitly calling this.retries(0) is semantically different from never calling this.retries() — the former prevents the test from inheriting retry settings from a parent suite, while the latter allows inheritance. This means all systemTests.it() tests now silently override any suite-level retry configuration. The call to this.retries() would be better guarded with a condition like checking if options.retries was explicitly provided.
Triggered by project rule: Overview



Additional details
retriessupport to the system test runner (ItOptionsandlocalItFndefault options) so individual tests can be retried on failure.Note
Low Risk
Low risk: changes are confined to the system test harness and a handful of system specs, only affecting CI test retry behavior.
Overview
Adds optional
retriessupport tosystemTests.it(ItOptions) and applies it via Mocha’sthis.retries()when generating per-browser tests.Updates several known-flaky system tests to run with retries (e.g. downloads, service worker/protocol, Vite dev server fresh), and resets service-worker request counters within the retried
onRunhook to avoid cross-attempt state leakage.Written by Cursor Bugbot for commit 420aabb. This will update automatically on new commits. Configure here.
Steps to test
yarn test-systemscoped to downloads, service worker, or vite dev server specs) and confirm they run with retries on failure where configured.How has the user experience changed?
PR Tasks
cypress-documentation?type definitions?