Fixing two flaky Cypress tests#4324
Merged
Merged
Conversation
added 2 commits
July 21, 2026 15:42
…y when the page had loaded. That's because Cypress itself was too late to start the assertions, because preselectedOptionIndex works immediately when the page loads. Removing those assertions, since it's impossible for them to become 2 without having been 1 at some point anyway...
…e focused. I saw this happened before preselectedOptionIndex and the option effects had run, so I'm adding some assertions to make it wait to begin tabbing until the page has properly loaded first.
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo frontend end-to-end tests were updated: one relaxes initial option-fetch assertions, and the other waits for reference data to load before continuing. ChangesFrontend E2E test updates
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Description
I saw a few tests that were flaky:
options.ts- this test would sometimes fail because the length was2already when the page had loaded. That's because Cypress itself was too late to start the assertions, becausepreselectedOptionIndexworks immediately when the page loads. Removing those assertions, since it's impossible for them to become2without having been1at some point anyway.tabbing.ts- This test ran into a failure mode where the whole body would be focused. I saw this happened beforepreselectedOptionIndexand the option effects had run, so I'm adding some assertions to make it wait to begin tabbing until the page has properly loaded first.Related Issue(s)
Verification/QA
kind/*andbackport*label to this PR for proper release notes groupingSummary by CodeRabbit