Repository navigation
test(DropdownMenu): the SSR test waits for the on-demand sheet before it ends - #8492
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewComponent Size
Sizes are gzip. Import counts the JavaScript the import loads eagerly; CSS counts the package stylesheet rules referenced by the modules it can load from its own package, lazily loaded ones included. Bundle Size SummaryGzip figures measure each package's entry file, not the code an import pulls in.
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
Recommended for approval: awaiting ./MenuBottomSheet and ./MenuBottomSheetActionList before unmounting removes the module loads that outlived the test and raised EnvironmentTeardownError, and the hydration assertion still catches an FR9 regression. No further changes are needed.
[Automated review]
|
Posted by Cindy's agent on her behalf. Decision (Cindy, 2026-10-25): approved under her standing rule to approve PRs CodeBunny recommends for approval. CodeBunny recommended approval at this exact head. What this PR needs: green CI at this head, then it merges. |
|
/approve-spec 720956d |
Maintainer impact
test-ui (2/4)fails intermittently on unrelated pull requests withEnvironmentTeardownError: Cannot load '…' after the environment was torn down, attributed toDropdownMenu.ssr.test.tsx. The missing module varies:CheckboxInput, orTooltipviaFieldLabel. Contributors rerun whole CI runs for a failure their change didn't cause.Intended invariant
The DropdownMenu SSR test finishes every module load it starts before it ends.
Change
packages/core/src/DropdownMenu/DropdownMenu.ssr.test.tsx: after the hydration it checks, the test awaits./MenuBottomSheetand./MenuBottomSheetActionList, then unmounts.Right after hydration, the bottom-sheet wrappers render, and each starts loading the touch sheet with
React.lazy(import(…)). The test used to unmount at once and end while those loads were still pulling in BottomSheet's module graph.vi.resetModules()starts a fresh load in each of the three iterations. When a load finished after the file's environment was torn down, Vitest reported the error.The assertion is unchanged: hydration still happens before the sheet loads, and no recoverable error may occur.
Evidence
CheckboxInput) and https://github.com/facebook/astryx/actions/runs/40261878799/job/121375978267 (Tooltip). Both originate in this file.Scope
Testing
pnpm vitest run --project ui packages/core/src/DropdownMenu/DropdownMenu.ssr.test.tsx.