Repository navigation
test(DateInput): the wheel activation proof waits on the sheet's own end, not on still frames before a deadline - #9942
Conversation
…end, not on still frames before a deadline
`openMonthYearWheels` waited for the sheet, and then for the year wheel,
with the harness's `waitForRest`: three still frames within 5 s. A starved
runner can present no frame for longer than that while nothing moves, so
the wait ran out ("still moving") and the proof failed. The proof now
checks the sheet's open transform, and then the wheels' full opacity, once
a frame with no deadline of its own, and waits on each animation's
`finished` promise. A starved runner only makes it later. The opening's
writes are still counted from the tap until the wheels rest.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| DateInput · Storybook | 147.4 kB (0) · 15.5 kB CSS (0) | 5,102 (0) | ✓ · ✓ · ✓ |
Package size: no published package changed; no new dependencies.
API changes: none in this pull request
Committed API report behind this build: cli 8 rows, theme-butter 1 row, theme-chocolate 1 row, theme-gothic 1 row, theme-matcha 1 row, theme-neutral 1 row, theme-stone 1 row, theme-y2k 1 row; run pnpm api:report.
Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. This is a draft from a fork, so CI starts once it is marked ready for review and a maintainer adds the ci:run label.
The change matches its description: the two waits no longer depend on frames arriving within 5 s, and the proof's assertions are unchanged.
Optional: settlesAt would wait forever on an infinite or scroll-timeline animation inside the element; keeping only animations with a finite endTime, as DropdownMenuItemAudit.a11y.chromium.spec.ts does, would guard against that.
[Automated review]
| for (;;) { | ||
| const unfinished = element | ||
| .getAnimations({subtree: true}) | ||
| .filter(animation => animation.playState !== 'finished'); |
There was a problem hiding this comment.
Optional: this keeps infinite and scroll-timeline animations too, and their finished never settles, so one inside the sheet would hold the proof until the 60 s test timeout. Nothing here runs one today. Keeping only animations with a finite end, as DropdownMenuItemAudit.a11y.chromium.spec.ts does, guards it:
.filter(
animation =>
animation.playState !== 'finished' &&
Number.isFinite(Number(animation.effect?.getComputedTiming().endTime)),
);There was a problem hiding this comment.
Thanks. This copy stays identical to the one in #8209, and nothing in either element runs such an animation today. The follow-up that moves settlesAt into the interaction harness will keep only animations with a finite end, once for both specs.
Maintainer impact
openMonthYearWheelsinWheelActivation.interaction.browser.spec.tswaits for the opening sheet, and then for the year wheel, with the harness'swaitForRest: three still frames before a 5 s deadline. A starved page can present no frame for longer than that while nothing moves. The wait then fails with "still moving" while the sheet is at rest. #8209 reports this spec failing that way under six workers, and gives its own month and year wheels' proof the same fix.Intended invariant
The proof's assertions are unchanged, and the opening's writes are still counted from the tap until the wheels rest. No product code changes, and no timeout changes.
Change
settlesAt(locator, property, value)checks a computed style once a frame until it holds the value, then awaits each unfinished animation'sfinishedpromise inside the element. It sets no deadline of its own.openMonthYearWheelswaits for the sheet's open transform (the identity), then for the wheels panel's full opacity. The year wheel parks its strip on its year as the wheels show.Evidence
ff0afc73ce(main) and5133257f9b(this change), make the page present no frame for 6 s from the field's tap. Scripts and input still run. Order-balanced runs (main, this, this,main):mainmainand this change both report narrow 2 options, 2 rows drawn, 2 painted, 1 element written, and wide 200, 200, 200, 3, in every run.Scope
Testing
Local, at 344b53b on
mainb31575d (Linux): the spec passes in Chromium (2 tests) and in WebKit (1; the mouse case is Chromium-only by design).pnpm -F @astryxdesign/core typecheck,pnpm lintand prettier on the spec, the Changeset coverage check (nothing ships) andpnpm review:pre(0 findings) pass.