Repository navigation
test(DropdownMenu): the SSR test loads the menu and its sheet at collection - #8685
Conversation
…ection The test makes three fresh module graphs (vi.resetModules) and imports DropdownMenu and its two on-demand sheet modules in each, all inside its 30 s budget, so their first load (5.4 s alone, far more on a busy machine) timed out under load. A static import of the three modules at the top loads them while the file is collected, which is untimed; each fresh graph then runs them again without that cost, and the sheet is still unloaded in each until the test imports it. With a 31 s first load of the sheet injected, the test timed out at 30 s before and passes in 204 ms after.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
This change looks good to merge. Loading DropdownMenu and its two sheet modules while the file is collected takes their first load out of the hydration test's 30 s budget, and the test still fails when the sheet wrapper renders during server render and hydration, so its spec:AST-013 FR9 coverage is unchanged. No further changes are needed.
[Automated review]
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 |
…muting it The hydration test silenced console.error and checked only React's recoverable errors, but React reports some mismatches only on the console: an attribute whose server value differs from the client's, for one. Nothing is logged today (all three hydrations log no console error), so the mute hid nothing yet; it would have hidden the next such mismatch. The test now watches console.error without muting it and asserts each hydration logs none. Red first: with the server markup's aria-haspopup tampered so it differs at hydration, the muted test passed (no recoverable error) and this one fails, naming the console error.
There was a problem hiding this comment.
Incremental review of d2430ba..7a6e375; prior findings carried: none.
This change still looks good to merge. Watching console.error instead of muting it makes the hydration test fail when an attribute differs between the server render and the hydrating render, which React reports only on the console, and the test stays green when the sheet loads slowly. The title and description still describe only the collection-time load, so consider mentioning the console assertion there too.
[Automated review]
Review only this PR's change: vjeux/astryx@a4ca90c...d2430ba
Maintainer impact
DropdownMenu.ssr.test.tsx› "hydrates a bottom-sheet menu cleanly on the first renders of a server process" times out at 30 s under load (2 of 5 full runs on a loaded machine). It makes three fresh module graphs (vi.resetModules) and imports DropdownMenu and its two on-demand sheet modules in each, all inside its 30 s budget, so their first load (5.4 s alone, far more on a busy machine) is timed.Intended invariant
A test's budget covers the behavior it checks, not a module's first load; collection, which is untimed, pays that (the pattern of #8471).
Change
A static import of
DropdownMenu,MenuBottomSheetandMenuBottomSheetActionListat the top of the file loads them while it is collected. Each fresh graph then runs them again without that cost, and the sheet is still unloaded in each until the test imports it, so the test proves what it proved.Evidence
MenuBottomSheet.tsx, not committed), the test timed out at 30 s.Scope
Testing
check:changesets.