Repository navigation
test(interaction-harness): a hold sent from the test names the motion it judges - #10438
Conversation
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| BottomSheet | 64.0 kB (0) · 7.5 kB CSS (0) | — | — · ✓ · — |
| BottomSheetSwitcher | 17.7 kB (0) · 3.4 kB CSS (0) | — | — · — · — |
| Button · Storybook | 58.0 kB (0) · 9.9 kB CSS (0) | 688 (0) | — · ✓ · — |
16 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| DateInput · Storybook | 179.6 kB (0) · 16.7 kB CSS (0) | 5,586 (0) | — · ✓ · — |
| Dialog | 23.2 kB (0) · 6.7 kB CSS (0) | — | — · ✓ · — |
| DialogHeader | 60.8 kB (0) · 11.4 kB CSS (0) | — | — · — · — |
| Drawer | 48.4 kB (0) · 8.2 kB CSS (0) | — | — · ✓ · — |
| DrawerHeader | 61.0 kB (0) · 12.8 kB CSS (0) | — | — · ✓ · — |
| Lightbox · Storybook | 109.2 kB (0) · 10.3 kB CSS (0) | 2,472 (0) | — · ✓ · — |
| List | 17.4 kB (0) · 651 B CSS (0) | — | — · ✓ · — |
| ListItem | 67.6 kB (0) · 11.3 kB CSS (0) | — | — · — · — |
| Popover · Storybook | 86.1 kB (0) · 13.9 kB CSS (0) | 1,488 (0) | — · ✓ · — |
| SegmentedControl | 91.2 kB (0) · 6.8 kB CSS (0) | — | — · ✓ · — |
| SegmentedControlItem | 16.5 kB (0) · 4.3 kB CSS (0) | — | — · — · — |
| Slider · Storybook | 104.1 kB (0) · 8.7 kB CSS (0) | 2,450 (0) | — · ✓ · — |
| Spinner · Storybook | 23.1 kB (0) · 6.1 kB CSS (0) | 351 (0) | — · ✓ · — |
| Switch · Storybook | 98.7 kB (0) · 9.9 kB CSS (0) | 1,725 (0) | — · ✓ · — |
| lab/NavigationScreen | 78.7 kB (0) · 1.5 kB CSS (0) | — | — · — · — |
| lab/NavigationStack | 78.7 kB (0) · 1.5 kB CSS (0) | — | — · ✓ · — |
Package size: no published package changed; no new dependencies.
API changes: none in this pull request
Committed API report behind this build: cli 19 rows, core 25 rows; run pnpm api:report.
Wide change (13 components): add ci:run-visual or ci:run-rtl to run them.
Generated by PR Enrichment workflow | View full report
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Changes requested: one call site this pull request updates now fails every run.
ButtonPressRelease.interaction.browser.spec.ts:273judges--astryx-press-alpha, but the harness reads animated properties fromgetKeyframes(), which in Chromium lists no property for a CSS animation of a registered custom property, soholdAnimationsrejects although its hold took the strength release, and the fine-pointer release test fails every run (it passes onmain).
A fix that keeps the judgement: let the judged-motion check read a CSSAnimation's properties from its @keyframes rule (named by animationName) when getKeyframes() lists none. The other updated call sites pass in Chromium with the motions they name, and the two new self-tests fail on main and pass here.
[Automated review]
There was a problem hiding this comment.
Changes requested: the Button fine-pointer release test still fails every run in Chromium.
- The new
@keyframeslookup inexpectJudgedMotionsHeld(internal/interaction-harness/src/curves.ts:1002-1020) reads only each sheet's top-level rules, but the built Storybook nests every Astryx@keyframesinside@layer astryx-base, soholdAnimationsstill cannot see--astryx-press-alphaandButtonPressRelease.interaction.browser.spec.ts:273fails on every run while it passes onmain.
Walking grouping rules (anything with cssRules) when looking for the CSSKeyframesRule makes that test pass; please also wrap the @keyframes in the new custom-property self-test in an @layer, so it covers the case Storybook ships. The other updated call sites pass in Chromium with the motions they name.
[Automated review]
…ames rule inside a layer
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because the pull request is a draft; it starts when the pull request is marked ready for review.
The nested @keyframes walk in expectJudgedMotionsHeld fixes the last blocker: the Button fine-pointer release test now finds --astryx-press-alpha inside @layer and passes, and the layered self-test fails against the previous top-level-only lookup. Every hold sent from the test now names the motion it judges, as INV6 of the component test sufficiency record requires.
- Before it can merge, the branch needs a rebase: the DateInput wheel, Switch and NavigationStack interaction specs conflict with current
main, which now arms a watch before the action on the same lines; keepmain's watch and this pull request'sjudges.
[Automated review]
…motion # Conflicts: # packages/core/src/DateInput/__tests__/Wheel.interaction.browser.spec.ts # packages/core/src/SegmentedControl/__tests__/SegmentedControl.interaction.browser.spec.ts # packages/core/src/Switch/__tests__/Switch.interaction.browser.spec.ts # packages/lab/src/NavigationStack/__tests__/NavigationStack.interaction.browser.spec.ts
There was a problem hiding this comment.
Approved pending CI: CI is still running on this head; 45 checks have passed and none has failed so far.
The merge with main resolves the four conflicting specs cleanly: where main now arms the hold before the action (DateInput wheel coast, SegmentedControl slide, Switch travel), the head keeps main's armHold and films its held, and every hold still sent from the test names the motion it judges, as INV6 of the component test sufficiency record requires. The new self-tests fail against the previous harness and pass here, and the merge-resolved sites pass in Chromium.
[Automated review]
Maintainer impact
A hold sent from the test (
holdAnimations, andanimationStoryboardwithoutheld) takes whatever runs when it reaches the page. The judged motion can still be to come, or already over on a busy runner, while other animations under the scope run. The test then samples or films a motion that is not the one it names, and stays green when the judged motion is wrong or missing. #10386 closed this for armed holds (armHold); this closes it for holds sent from the test.Intended invariant
architecture:component-test-sufficiencyINV6: "A motion judgement holds and asserts the judged motion itself, named by its target element and animated property; a held count alone does not prove it, since other animations can fill the count." The record already applies tointernal/interaction-harness/.Change
holdAnimations(page, scope, {judges}):judgesis required, as forarmHold({target, property, pseudoElement?}, a list, or'count-only'). The call rejects when the hold took no animation of each judged motion on that exact target; the error names the judged motion and every animation the hold took, and says to arm the hold before the action (armHold).animationStoryboard: takes eitherheld(fromarmHold, which already checked its judged motion) orjudges(the film holds now, throughholdAnimations). Passing neither is a type error, and rejects at run time.armHoldandholdAnimationsshare one check.'count-only'checks nothing, as before.Audit
Each hold sent from the test and the motion it judges. In this pull request's CI (Chromium and WebKit interaction proofs, accessibility browser specs), every one of them holds its judged motion: none was vacuous on main, so no call site needs
'count-only'.transformtranslatetransformoropacity::beforeopacity--astryx-press-alpha(found through its@keyframesrule: Chromium'sgetKeyframes()leaves out a custom property, and StyleX nests the rule in a@layer)translateopacitytransformscaleopacity::beforeopacityscale::beforetranslatetranslatetransform::beforeopacitytranslatetranslateopacitySites that hold from the test after the action are exposed to the late-hold race even when they pass here. Converting them to
armHold(armed before the action) removes it; that belongs to the component lanes:Writing rubric results
No knowledge record changes in this pull request.
Evidence
holdAnimationsreturns the press, and a film of that hold shows the press.translate on #thumband the press it took. "a film that holds now refuses to start without the motion it shows" pins the missing-judgescase.Scope
Testing
tsc --noEmitpasses for the harness; Core reports no errors in the changed files.