Repository navigation
test(Tooltip): TooltipTallContentTracking waits for what it checks - #9396
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 |
|---|---|---|---|
| Tooltip · Storybook | 17.9 kB (0) · 5.0 kB CSS (0) | 580 (0) | ✓ · ✓ · ✓ |
Package size: no published package changed; no new dependencies.
API changes: none in this pull request
Committed API report behind this build: core 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.
Requesting changes: the animation-row and switch-check timing fixes look right, but counting frames from the test's own observer report changes what this suite proves for spec:AST-059 FR8. FR8, its verification row for this suite and architecture:layer-runtime INV12 allow at most one painted frame over the trigger after a same-size move. expectClearAfterReport now skips every frame painted before the report, so a second overlapping frame passes whenever the report is late. Either amend those claims to bound the overlap by the move observer's report (an engineering owner, which includes you, records it with /approve-spec <full head SHA>), or keep the frame-2 bound in the seven frame-counted checks and land the other three commits on their own; either way, make the test title at line 540 and the description's stated FR8 invariant match.
[Automated review]
| ) { | ||
| for (const [i, frame] of frames.entries()) { | ||
| if (i === 0) { | ||
| if (i < reportedAfter) { |
There was a problem hiding this comment.
This skips every frame painted before the test's own observer reports, up to frame 9 in the layout tests. A tooltip that covers its trigger in frame 2 therefore passes whenever the report is late. spec:AST-059 FR8, its verification row for this suite and architecture:layer-runtime INV12 allow only the first painted frame, so either amend those claims to a report-relative bound or keep i === 0 here.
The row reversed its animation a moment after the animation started, so on a loaded machine it ran back to its start and finished between the test's two reads. It is reversed 9 s into its 10 s now.
The test set each row's state, waited a fixed 100 ms, and read every row's time before and after placing the tooltip afresh, expecting a running row to move on by the time between the reads. A row's animation the sets had just made (the scripted animation, the transition) or re-timed is pending until a frame starts it, holding its time until then; on a loaded machine no frame came within the 100 ms, and the row started late. The test waits until every row's animation is ready.
The checks that the tooltip had switched to its anchor-clear list read the attribute after a fixed 200, 300, 450 or 1500 ms. The switch follows the move observer's report, later on a loaded machine; the checks wait for the attribute.
9743ef9 to
2cec999
Compare
There was a problem hiding this comment.
This looks ready to merge: each check now waits for the state it reads, and the seven frame-counted checks still fail on a tooltip that covers its trigger past the first painted frame, as spec:AST-059 FR8 and its verification row for this suite require. The earlier concern about counting frames from the observer's report no longer applies, since that change is gone from this branch. Nothing else is needed from you.
[Automated review]
Not to be merged on Monday between 06:00 and 09:00 PT (release window).
Maintainer impact
On a loaded runner,
TooltipTallContentTracking.a11y.browser.spec.tsfails in checks whose timing is wall-clock, with nothing wrong in the tooltip:Intended invariant
architecture:layer-runtimeINV12). The seven frame-counted checks keep that frame-2 bound, unchanged.Change
ready.Evidence
Chromium, pinned to two cores with 4 workers unless noted. The seams were local copies of the spec.
Scope
Testing
packages/core/src/Tooltip/__tests__/TooltipTallContentTracking.a11y.browser.spec.tsin Chromium and in WebKit (the Playwright container, 4 CPUs).Local gates at 2cec999:
pnpm lint(0 errors);pnpm check:repoandpnpm check:knowledge;