Repository navigation
test: wait for the tour dialog before finding its button by name - #2287
Merged
brian-smith-tcril merged 1 commit intoDec 3, 2026
Merged
brian-smith-tcril merged 1 commit into
brian-smith-tcril merged 1 commit into
Conversation
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
brian-smith-tcril
added a commit
to brian-smith-tcril/bairf
that referenced
this pull request
Dec 2, 2026
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2287 +/- ##
=======================================
Coverage 99.27% 99.27%
=======================================
Files 373 373
Lines 5505 5505
Branches 1465 1469 +4
=======================================
Hits 5465 5465
Misses 40 40 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
arbrandes
approved these changes
Dec 3, 2026
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.
Summary
"completes the existing-user tour" in
src/product-tours/ProductTours.test.jsxfails on a machine under CPU load withUnable to find role="button" and name "Okay". The test polled for the button by accessible name while the tour was still rendering. That query is expensive enough to hold the thread the render needs, so the checkpoint arrives afterfindByRole's 1000 ms. Test-only change.CI has not hit this; it shows up in local full runs on a busy machine.
What changed
findByRole('dialog')before it finds the "Okay" button by name.Testing
Measured on master at
ed620369, Node 24.22.3, 8 cores, runningsrc/product-tours/ProductTours.test.jsxalone. "Loaded" means eightnode -e 'for(;;){}'processes running alongside.Cost of one query on the page this test renders (146 elements, 11 buttons):
queryByRole('button', { name: 'Okay' })queryByRole('dialog')Time until the checkpoint is visible, by what the wait polls with (4 runs each):
getByRole('dialog')getByRole('button', { name: 'Okay' })The test itself, loaded: failed 2 of 2 runs before this change, passed 3 of 3 after.
npm run lintreports 0 errors.Not covered here: "completes the courseware tour" finds its "Okay" button the same way and failed 1 of 3 loaded runs after this change. In a loaded full
npm run test, the three longest tests in the file can also exceed the 5000 ms test timeout.🤖 Generated with Claude Code