Repository navigation
test(Switch): hold the travel from its start - #10316
Conversation
|
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 |
|---|---|---|---|
| Switch · Storybook | 97.8 kB (0) · 9.9 kB CSS (0) | 1,725 (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 24 rows; 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
|
/approve-spec cdd6bdb |
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 already carries the ci:run label, so marking it ready for review starts CI.
The Switch travel test and tap storyboard now hold the travel from its start, and the storyboard's presence check fails when its hold misses the travel, as architecture:component-test-sufficiency INV6 asks. The diff also contains #10286's commit, so this pull request lands with or after #10286.
[Automated review]
Two tests held the switch's travel once the test had seen it run. On a loaded runner the travel had often ended by then, so the hold caught it at rest. Both now arm armHold before the action. The tap's storyboard holds at a count of 3: the press starts two animations, and the release starts its travel with several others at once.
|
/approve-spec 25979cd |
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 already carries the ci:run label, so marking it ready for review starts CI.
Both Switch tests now arm armHold before their action and name the thumb's translate as the judged motion, as architecture:component-test-sufficiency INV6 asks, so a hold that misses the travel fails instead of sampling or filming the wrong motion.
One small description fix: the last Change bullet says both tests drop thumb, but the tap storyboard keeps it to name the judged motion.
[Automated review]
Maintainer impact
On a loaded runner, two Switch tests held the switch's travel after it had already ended. At one CPU with 4 workers, on #10286's head, the travel test passed 2 of 10 runs and the tap storyboard 8 of 10.
Intended invariant
The harness's
armHolddocumentation says to arm it before the action that starts the animation. A hold sent once the animation runs reaches the page later the busier the machine is.Change
armHoldon the switch before the programmatic change.armHoldbefore the tap, with a count of 3. The press starts two animations. The release starts its travel with several others at once, so the hold lands at the release. The storyboard takes what the hold took.architecture:component-test-sufficiencyINV6).thumbthat only the old wait used.Each
armHoldnames the thumb'stranslatewithjudges. In the storyboard, that replaces its own check for the travel.Evidence
{"t":0,"actual":0,"expected":-16}). The storyboard's frames ran past the on end, to 25.3 and 30.7 px against 16.1.Scope
Testing
Counts:
--cpus=4, 1 worker), 10 runs: 20 of 20.tsc --noEmitpasses, and ESLint reports no new findings in the file.