Repository navigation
test(Table): hold the row glide before reading chevron timing - #10380
Conversation
Co-authored-by: astracat-bot[bot] <323722387+astracat-bot[bot]@users.noreply.github.com>
|
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 |
|---|---|---|---|
| TableBody | 3.5 kB (0) · 3.3 kB CSS (0) | — | ✓ · ✓ · ✗ |
| TableFooter | 3.5 kB (0) · 3.3 kB CSS (0) | — | ✓ · ✓ · ✗ |
| TableHeader | 3.5 kB (0) · 3.3 kB CSS (0) | — | ✓ · ✓ · ✗ |
5 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| TableRow | 6.7 kB (0) · 3.9 kB CSS (0) | — | ✓ · ✓ · ✗ |
| Table | 100.9 kB (0) · 17.3 kB CSS (0) | — | ✓ · ✓ · — |
| TableCell | 92.6 kB (0) · 17.1 kB CSS (0) | — | ✓ · ✓ · ✓ |
| TableHeaderCell | 92.2 kB (0) · 16.8 kB CSS (0) | — | ✓ · ✓ · ✓ |
| TableSelectionToolbar | 61.6 kB (0) · 12.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 24 rows; run pnpm api:report.
Touched components checked; add ci:run-visual 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; it runs once the pull request is marked ready for review.
Moving the chevron-timing check onto toggleAndHold makes it read a live glide: on a slowed runner the previous version fails with glideMs of NaN and this version passes, with every timing assertion unchanged. Pull request CI runs this browser spec only with the ci:run-a11y label, so a maintainer adding it lets CI confirm the fix before merge.
[Automated review]
Supersedes #10329 (co-authored by astracat-bot)
The same one-file change, re-cut on a maintainer branch:
packages/core/src/Table/__tests__/TableRowGlide.a11y.browser.spec.tsmatches #10329's headf20fc16abyte for byte.Maintainer impact
The chevron timing check failed in CI run 42261899652, Accessibility spec-test contracts (3/6), job 128052542178.
expect(timing.glideMs).toBeGreaterThan(0)receivedNaN. That was the shard's only failure (559 tests passed), so the aggregate's “Require every contract shard” gate also failed.Intended invariant
Table FR15 and AST-105 FR4 require the chevron and row glide to share the theme's timing. The test must still require a real glide, a positive duration, equal chevron/glide durations, and the theme's easing curve. No behavior change.
Change
Reuse
toggleAndHold(page, 0, 90)before reading the timing. The helper holds animations as the click starts them, before a slow runner can miss the entire glide. The separate awaited click previously let the animation finish before the timing evaluation; no active glide then meantNumber(undefined)becameNaN.The positive duration, duration equality, curve, column-divider and reduced-motion assertions are unchanged. The new check additionally requires the helper to capture at least one row animation. There are no product, workflow, timeout, assertion-tolerance, or baseline changes.
Evidence
The same test passed in CI run 42261811491 (#34481), commit
3bd5a4c1b429c389d70b5c28bb96d333411b3c64, job 128050803181. The next failing commit was19171513dbd543a0999c4e05818cccea07d180e6.With Playwright
launchOptions.slowMo: 500in a temporary config that otherwise uses the repository's config, the unchanged test reproduced the exactNaNassertion in 2/2 runs at the failing commit. After fetching current main (21599169a2a68c1912545b165af0e9c908d67c85) and rebuilding Storybook, it still failed in 2/2 runs. The artificial delay makes the scheduling race deterministic; it is not a claim that every ordinary-speed run fails.Testing
pnpm exec playwright test packages/core/src/Table/__tests__/TableRowGlide.a11y.browser.spec.ts --config=playwright.config.ts --project=chromium: all 12 tests passed, including divider pixels, pinned cells, no-handle behavior and reduced motion.slowMo: 500and--repeat-each=5: 5/5 passed after the change (2/2 failed before).git diff --check,pnpm specs:for --diff origin/main, andpnpm review:pre: passed; the pre-review report had no findings.Scope
See also #8088.
See also #10296.