Repository navigation
test(DropdownMenu): capture geometry after its frame samples settle - #12342
astracat-bot[bot] wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
This test passed on main since, but it failed intermittently ( |
There was a problem hiding this comment.
Changes requested: waiting for the menu to stop moving is a sound fix for this flake, but the receipt it writes no longer shows whether the menu moved.
- In
DropdownMenuAudit.a11y.chromium.spec.ts, the poll overwritesfirstBoxon every pass (line 670), so after a retrysettledRender.initialandmaxDelta(line 1042) describe only the last, still pair, and a menu that moved 286 px before settling writes the same receipt as one that never moved: please keep the opening sample and the largest movement insettledRenderbeside the settled pair.
Everything else checks out: only this spec changes, the claimed-state and forced-colors assertions are untouched, and ESLint and Prettier pass on the file.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the release-evidence failure was the fourth audit chunk's geometry check receiving 286: verified in the failing job's log.
- Claim: the spec polls the same x, y, width and height movement until the 0.5 px bound holds: verified (lines 660-682).
- Claim: the measured pair is kept in
settledRender: verified (line 1042); see the finding above. - Claim: a missing box still fails at once instead of waiting: verified (lines 665-669 and 683-685).
- Claim: every claimed-state, focus, overflow, theme and forced-colors assertion is kept: verified; the diff touches only lines 650-685.
- Claim: no product code, visibility wait, timeout, tolerance or baseline changes: verified; one test file changes, the 0.5 px bound is unchanged, and the poll uses the default expect timeout.
- Claim: Prettier and ESLint pass: verified on the file at this head.
- Claim: repeated local and lab runs of the audit pass: not verified; the audit was not rerun, and pull-request CI does not run a changed audit spec.
- Claim: the test went red in two streaks in seven days: not verified beyond the one failing run read.
- Claim: the older contract-shard failure is a separate MoreMenu sheet assertion: verified in that run's annotations.
- Claim: another open pull request also edits this test file: verified from its file list.
- File
packages/core/src/DropdownMenu/__tests__/DropdownMenuAudit.a11y.chromium.spec.ts: one finding, above.
|
validation: ran pnpm exec playwright test packages/core/src/DropdownMenu/tests/DropdownMenuAudit.a11y.chromium.spec.ts --config playwright.config.ts --project chromium --repeat-each=20 --workers=4 --reporter=list after the receipt change: 100/100 passed (20 complete audit repetitions); pnpm storybook:build, Prettier and ESLint passed; pnpm review:pre reported zero findings. Addressed the review on 3b74548: A temporary receipt replay using the spec's exact sampling block and receipt expression failed the 286 px preservation case in 2/2 runs before this change. Afterward, four cases passed 80/80 checks over 20 repetitions: a 286 px move, several moving pairs with a later smaller delta, unchanged/subpixel geometry, and missing initial/subsequent boxes. This replay is not a product-browser reproduction and is not submitted. The real-browser audit above reran all original assertions. All 32 final receipts include both new fields, with settled deltas within 0.5 px. The first audit invocation stopped in setup because the fresh Storybook build lacked CI's source stamp; after applying the existing CI stamping step, the full repeat run passed. No product code, assertion, timeout, tolerance, visibility wait, or baseline changed. No unresolved implementation doubt remains; the cause of the original transient product-layout sample remains unproven, as the existing description states. See also #11297 and #12343. |
|
This test passed on main since, but it failed intermittently ( |
There was a problem hiding this comment.
Approved pending CI: waiting for the menu's box to settle before each frame fixes this flake, and the receipt now keeps the opening sample and the largest move beside the settled pair, so the earlier receipt finding is resolved.
CI finished on this head with one failure that this change does not cause: the UI test shard test-ui (1/4) timed out downloading dependencies before any test ran, which also fails the aggregate test check, so a rerun of that job is needed before merge.
Claims and files checked
Review mode: full; reason: author-not-engowner
- Claim: the release-evidence failure was the fourth audit chunk's geometry check receiving 286: verified in that job's log.
- Claim: one pair of samples two frames apart can straddle an opening layout update: verified as a description of the base, which takes exactly one such pair.
- Claim: the spec polls the same x, y, width and height movement until the existing 0.5 px bound holds: verified (lines 661-684).
- Claim: the settled pair is kept in
settledRender: verified (lines 1047-1049), with the opening sample and the largest move beside it (lines 1045-1046). - Claim: a missing box still fails at once instead of waiting for it to reappear: verified (lines 651-653, 666-670 and 685-687).
- Claim: every claimed-state, focus, overflow, theme and forced-colors assertion is kept: verified; the diff touches only the sampling block and the receipt.
- Claim: no product code, visibility wait, timeout, tolerance or baseline changes: verified; one test file changes, the 0.5 px bound is unchanged, and the poll uses Playwright's default expect timeout.
- Claim: repeated local and lab runs of the audit passed: partly verified; a full run and ten repetitions of the audit at this head passed, and the author's own runs were not reproduced at their scale.
- Claim: every final frame receipt reports zero settled movement: verified at this head, where all 32 receipts also record a largest move of zero.
- Claim: Prettier and ESLint pass and the pre-review checks report no findings: Prettier and ESLint verified on the file at this head; the pre-review script was not rerun.
- Claim: the test went red in two streaks in seven days: partly verified; the later failure matches the release job read, and the earlier one was not read.
- Claim: a temporary browser probe saw the box move before it settled: not verifiable, since the probe is not submitted.
- Claim: the older contract-shard failure is a separate MoreMenu sheet assertion: verified in that job's annotations.
- Claim: another open pull request also edits this test file: verified from its file list.
- File
packages/core/src/DropdownMenu/__tests__/DropdownMenuAudit.a11y.chromium.spec.ts: clear.
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| DropdownMenu | 108.3 kB (0) · 18.9 kB CSS (0) | — | ✗ · ✓ · ✓ |
| DropdownMenuCheckboxItem | 28.6 kB (0) · 7.3 kB CSS (0) | — | ✗ · ✓ · ✓ |
| DropdownMenuDivider | 5.3 kB (0) · 548 B CSS (0) | — | ✗ · ✓ · — |
6 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| DropdownMenuGroup | 6.4 kB (0) · 3.4 kB CSS (0) | — | ✗ · ✓ · — |
| DropdownMenuItem | 27.8 kB (0) · 6.9 kB CSS (0) | — | ✗ · ✓ · — |
| DropdownMenuRadioGroup | 6.6 kB (0) · 3.3 kB CSS (0) | — | ✗ · ✓ · — |
| DropdownMenuRadioItem | 28.7 kB (0) · 7.3 kB CSS (0) | — | ✗ · ✓ · — |
| DropdownMenuSubMenu | 78.7 kB (0) · 10.5 kB CSS (0) | — | ✗ · ✓ · ✓ |
| ContextMenuItem | 35.5 kB (0) · 7.1 kB CSS (0) | — | — · — · — |
Visual changes: 4 snapshots in 1 component
A change is a question for the reviewer, not a failure.
Inheritance checked against the 7 newest reports of other pull requests.
Package size: no published package changed; no new dependencies.
Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.
Current run: CI concluded failure; parts of this report may be missing.
Generated by PR Enrichment workflow | View full report
…12343) * test(DropdownMenu): capture geometry after its frame samples settle Re-cut of #12342 by astracat-bot, byte for byte on current main. Co-authored-by: astracat-bot[bot] <323722387+astracat-bot[bot]@users.noreply.github.com> * test(DropdownMenu): retain opening geometry and peak sampled movement Re-cut of #12342's second commit (b5c0a2d) by astracat-bot, byte-identical. Co-authored-by: astracat-bot[bot] <astracat-bot[bot]@users.noreply.github.com>












validation: ran pnpm exec playwright test packages/core/src/DropdownMenu/tests/DropdownMenuAudit.a11y.chromium.spec.ts --config playwright.config.ts --project chromium --repeat-each=20 --workers=4 --reporter=list: 100/100 passed, covering 20 complete audit repetitions; Prettier and ESLint passed; pnpm review:pre reported zero findings. CodeBunny's CI lab also passed 20/20 unchanged runs at the failing commit (repro 6674083777953085362).
Maintainer impact
Run 44088856748 (#43793), job 134066319568, failed the fourth DropdownMenu audit chunk at commit deb3b38:
expect(geometryDelta).toBeLessThanOrEqual(0.5)received 286. A single pair of frame samples can straddle an opening layout update, preventing the audit from producing its settled-frame evidence.Intended invariant and change
The screenshot and its receipt must describe a settled layout. Poll the same maximum x/y/width/height movement until it satisfies the existing 0.5-pixel bound, then retain that measured pair in
settledRender. A missing box still fails immediately rather than waiting for UI to reappear. Keep every claimed-state, focus, overflow, theme and forced-colors assertion.No behavior change. Only this spec changes; no product code, visibility wait, timeout, tolerance or baseline changes.
Evidence
The exact layout update behind the CI sample was not reproduced locally or in the lab. This deliberately corrects the sampling assumption, rather than guessing at a product positioning change.
Scope
Fixes:
decb2da1cd586cd61a826365f5521732ae2b52797d21ba8eeb3a1e077c3442cd— captures DropdownMenu states 4/4 with sensor receipts.The older contract-shard failure in run 44073648282 is a separate MoreMenu sheet-row assertion, not covered by this change.
See also #11297.
#11297 by bezabyte also changes this test file.