Repository navigation
test(ContextMenu): the nested bottom-sheet case waits for its first row - #7761
Merged
Merged
Conversation
ContextMenu's touch sheet is React.lazy, so its first render suspends once even when the module is already loaded. 'drills into nested data items inside the BottomSheet' queried its first row synchronously and passed only after an earlier case had rendered a sheet; run alone it failed. It now awaits the row with findByRole.
vjeux
requested review from
cixzhang,
imdreamrunner and
josephfarina
as code owners
October 20, 2026 20:43
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
AI review status for this pull request.
|
3 tasks done
Contributor
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewModified ComponentsContextMenu (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
Contributor
There was a problem hiding this comment.
This looks ready to merge. Awaiting the first sheet row with findByRole lets "drills into nested data items inside the BottomSheet" pass on its own, and the case still fails if ContextMenu's sheet never renders that row. Run alone, the case fails on main and passes on this branch, and the ContextMenu, DropdownMenu and MoreMenu suites stay green. No changes are needed.
[Automated review]
This branch was successfully deployed
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.
Maintainer impact
ContextMenu.test.tsx's "drills into nested data items inside the BottomSheet" fails when it runs alone (vitest run ContextMenu.test.tsx -t "drills into nested"), onmaintoo. In the full file it passes only because an earlier sheet case has already rendered ContextMenu's sheet.Intended invariant
Each sheet case passes on its own, whatever ran before it. ContextMenu's touch sheet is
React.lazy, so its first render suspends once even when the module is already loaded (as #7758's warm-up ensures). A case must wait for the sheet's first row instead of querying it in the same tick as the open.Change
The case awaits its first row with
findByRolebefore clicking it. The case and its assertions are otherwise unchanged. The other two sheet cases already wait for the sheet throughwaitForand pass alone. Test file only: no source, story or record change, so no changeset.Evidence
main's suite, each running only this case: 20 of 20 fail ("Unable to find an accessible element with the role "button" and name "Move to project"").Scope
Testing