Skip to content

test(Table): hold the row glide before reading chevron timing - #10380

Merged
cixzhang merged 3 commits into
mainfrom
recut/table-row-glide-chevron-timing
Nov 6, 2026
Merged

cixzhang merged 3 commits into
mainfrom
recut/table-row-glide-chevron-timing

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

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.ts matches #10329's head f20fc16a byte 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) received NaN. 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 meant Number(undefined) became NaN.

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 was 19171513dbd543a0999c4e05818cccea07d180e6.

With Playwright launchOptions.slowMo: 500 in a temporary config that otherwise uses the repository's config, the unchanged test reproduced the exact NaN assertion 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.
  • The chevron test with slowMo: 500 and --repeat-each=5: 5/5 passed after the change (2/2 failed before).
  • Focused ESLint, Prettier, git diff --check, pnpm specs:for --diff origin/main, and pnpm review:pre: passed; the pre-review report had no findings.
  • WebKit was attempted but could not launch because the host is missing browser libraries. Chromium is the engine of the failing CI check.
  • Only this test file changes; runtime code is unchanged. A fresh independent review has not been performed.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text contains no private operational context.

See also #8088.
See also #10296.

Co-authored-by: astracat-bot[bot] <323722387+astracat-bot[bot]@users.noreply.github.com>
@cixzhang cixzhang added the ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) label Nov 6, 2026
@vercel

vercel Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 6, 2026 10:32pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 6, 2026
@astracat-bot

astracat-bot Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 6, 2026, 10:35 PM UTC

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 3cceea7

Storybook · Sandbox · built from this PR's head

Modified components

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

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]

@cixzhang
cixzhang marked this pull request as ready for review November 6, 2026 21:38
@cixzhang
cixzhang merged commit c967427 into main Nov 6, 2026
104 of 109 checks passed
@github-actions
github-actions Bot deleted the recut/table-row-glide-chevron-timing branch November 7, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — 3cceea76 Deployed Nov 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant