Repository navigation
Fix flaky Cypress specs and run the suite once, burning in only changed specs - #1568
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI ran the whole suite three times (about 27 minutes for a passing job), so one flaky spec failed unrelated PRs such as #1567. This fixes the flaky specs at their cause, without retries, and repeats only the specs a change touches.
Flaky specs
OfflineBanneronly listened forofflineevents, so a connection lost before hydration was never shown. It now also readsnavigator.onLineon mount, and the test goes offline before the page loads.should.cy.clock(newcypress/support/clock.ts). The old retry test finished in 0.9 s, so it never actually exercised the 3 s retry; now it does.Speed: the premium polling and slot-assignment tests run on a faked clock instead of real waits. Three tests were merged into two, with the same coverage; the suite has 280 tests. One pass takes about 4:35 instead of 6:47.
Gate:
scripts/verify-cypress.mjsfirst runs the changed specs, and specs importing a changed support module, two extra times. Then it runs the suite once. The base is the merge commit's first parent for PRs andgithub.event.beforefor pushes; manual runs get the full pass only. A passing job is expected to take about 9–13 minutes.Verified locally: a production test build passed the new gate 3 times in a row (each run: the burn-in specs twice, then 280/280). The five formerly flaky specs passed 10/10 each in fresh processes.
This replaces #1563 and #1564.
🤖 Generated with Claude Code