Repository navigation
test: watch before the action at 28 first-contact waits - #10286
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 |
|---|---|---|---|
| Button · Storybook | 56.3 kB (0) · 9.8 kB CSS (0) | 688 (0) | — · — · — |
| DateInput · Storybook | 177.8 kB (0) · 16.6 kB CSS (0) | 5,586 (0) | — · — · — |
| List | 5.4 kB (0) · 469 B CSS (0) | — | — · — · — |
6 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| ListItem | 65.5 kB (0) · 11.1 kB CSS (0) | — | — · — · — |
| SegmentedControl | 90.2 kB (0) · 6.8 kB CSS (0) | — | — · — · — |
| SegmentedControlItem | 16.3 kB (0) · 4.3 kB CSS (0) | — | — · — · — |
| Switch · Storybook | 97.0 kB (0) · 9.9 kB CSS (0) | 1,725 (0) | — · — · — |
| lab/NavigationScreen | 78.6 kB (0) · 1.5 kB CSS (0) | — | — · — · — |
| lab/NavigationStack | 78.6 kB (0) · 1.5 kB CSS (0) | — | — · — · — |
Package size: measured; main has no measurement of the merge base to compare yet.
API changes: cli +14 · ~5 · −0 (against the merge base's committed report)
Committed API report behind this build: cli 19 rows, core 24 rows; run pnpm api:report.
19 API changes (advisory)
| Package | Where | Signature | Usage | |
|---|---|---|---|---|
| + | cli |
./api · Types · type SearchResultEntry |
deprecated?: ComponentDeprecation | undefined |
import type {SearchResultEntry} from '@astryxdesign/cli/api'; const x: SearchResultEntry = {deprecated: …} |
| + | cli |
./authoring · Types · interface ComponentDeprecation |
interface ComponentDeprecation |
import type {ComponentDeprecation} from '@astryxdesign/cli/authoring' |
| + | cli |
./authoring · Types · interface ComponentIconSlotDoc |
interface ComponentIconSlotDoc |
import type {ComponentIconSlotDoc} from '@astryxdesign/cli/authoring' |
| + | cli |
./authoring · Types · interface ComponentIconSlotStateDoc |
interface ComponentIconSlotStateDoc |
import type {ComponentIconSlotStateDoc} from '@astryxdesign/cli/authoring' |
| + | cli |
./authoring · Types · interface MultiComponentDoc |
deprecated?: ComponentDeprecation |
import type {MultiComponentDoc} from '@astryxdesign/cli/authoring'; const x: MultiComponentDoc = {deprecated: …} |
| + | cli |
./authoring · Types · interface SingleComponentDoc |
deprecated?: ComponentDeprecation |
import type {SingleComponentDoc} from '@astryxdesign/cli/authoring'; const x: SingleComponentDoc = {deprecated: …} |
| + | cli |
./doc · Types · interface ComponentBaseDoc |
deprecated?: ComponentDeprecation |
import type {ComponentBaseDoc} from '@astryxdesign/cli/doc'; const x: ComponentBaseDoc = {deprecated: …} |
| + | cli |
./doc · Types · interface SubComponentDoc |
deprecated?: ComponentDeprecation |
import type {SubComponentDoc} from '@astryxdesign/cli/doc'; const x: SubComponentDoc = {deprecated: …} |
| + | cli |
./doc · Also exported from an earlier entry point · ComponentDeprecation |
ComponentDeprecation (./authoring) |
import {ComponentDeprecation} from '@astryxdesign/cli/doc' |
| + | cli |
./doc · Also exported from an earlier entry point · ComponentIconSlotDoc |
ComponentIconSlotDoc (./authoring) |
import {ComponentIconSlotDoc} from '@astryxdesign/cli/doc' |
| + | cli |
./doc · Also exported from an earlier entry point · ComponentIconSlotStateDoc |
ComponentIconSlotStateDoc (./authoring) |
import {ComponentIconSlotStateDoc} from '@astryxdesign/cli/doc' |
| + | cli |
./template · Also exported from an earlier entry point · ComponentDeprecation |
ComponentDeprecation (./authoring) |
import {ComponentDeprecation} from '@astryxdesign/cli/template' |
| + | cli |
./template · Also exported from an earlier entry point · ComponentIconSlotDoc |
ComponentIconSlotDoc (./authoring) |
import {ComponentIconSlotDoc} from '@astryxdesign/cli/template' |
| + | cli |
./template · Also exported from an earlier entry point · ComponentIconSlotStateDoc |
ComponentIconSlotStateDoc (./authoring) |
import {ComponentIconSlotStateDoc} from '@astryxdesign/cli/template' |
| ~ | cli |
./api · Functions · function search |
function search: (query: string, options?: { cwd?: string | undefined; type?: "template" | "component" | "hook" | "theme" | "doc" | undefined; limit?: number | undefined }) => Promise<SearchResponse> → function search: (query: string, options?: { cwd?: string | undefined; type?: "template" | "component" | "doc" | "theme" | "hook" | undefined; limit?: number | undefined }) => Promise<SearchResponse> |
import {search} from '@astryxdesign/cli/api'; search(…) |
| ~ | cli |
./authoring · Types · interface MultiComponentDoc |
theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } |
import type {MultiComponentDoc} from '@astryxdesign/cli/authoring'; const x: MultiComponentDoc = {theming: …} |
| ~ | cli |
./authoring · Types · interface SingleComponentDoc |
theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } |
import type {SingleComponentDoc} from '@astryxdesign/cli/authoring'; const x: SingleComponentDoc = {theming: …} |
| ~ | cli |
./doc · Types · interface ComponentBaseDoc |
theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } |
import type {ComponentBaseDoc} from '@astryxdesign/cli/doc'; const x: ComponentBaseDoc = {theming: …} |
| ~ | cli |
./doc · Types · interface SubComponentDoc |
theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } |
import type {SubComponentDoc} from '@astryxdesign/cli/doc'; const x: SubComponentDoc = {theming: …} |
Wide change (6 components): add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.
Generated by PR Enrichment workflow | View full report
3fe52ec to
34e1b2f
Compare
|
/approve-spec 34e1b2f |
There was a problem hiding this comment.
Requesting changes for one wording fix; the test change itself follows what the harness README prescribes for first-contact waits.
- The title says "every first-contact wait", but
packages/core/src/BottomSheet/__tests__/BottomSheetKeyboardInset.interaction.browser.spec.ts:299still has an unwatched first-contactwaitForAnimation(content)(the description leaves it to #10279), so please retitle to what this pull request changes, for example "test: watch before the action at 28 first-contact waits". - Non-blocking:
Wheel.interaction.browser.spec.tsnow useswaitForAnimationonly astypeof, so ESLint warnsconsistent-type-importson its import;type waitForAnimationclears it.
CI has not run on this head yet (the pull request is a draft).
[Automated review]
| @@ -49,6 +49,7 @@ import { | |||
| trackMarker, | |||
| waitForAnimation, | |||
There was a problem hiding this comment.
Non-blocking: with the four calls converted, waitForAnimation is now used only in typeof waitForAnimation (line 236), so ESLint warns @typescript-eslint/consistent-type-imports on this import. Importing it as type waitForAnimation, or typing WheelAnimation as the harness's ActiveAnimation, clears it.
Twenty-eight interaction tests read their first animation with an unwatched waitForAnimation, right after the action that starts it. That call is the page's first contact with the harness, so it also installs the recorder. A run that ends before it is invisible, and the wait times out under load. Each test now takes watchAnimations on the same locator before the action, then reads it with started(), with the same options. SegmentedControl's waitForLens takes an optional watch. Traced tests take the watch before the window their proof counts.
34e1b2f to
4d488bb
Compare
|
/approve-spec 4d488bb |
There was a problem hiding this comment.
Approving: each of the 28 converted waits now takes watchAnimations before its action, as the interaction harness README prescribes for a page's first contact, with no assertion changed, and the title matches what the pull request changes.
Approved pending CI: CI has not run on this head yet, because the pull request is a draft from a fork; once it is ready for review, a maintainer adds the ci:run label so CI runs.
[Automated review]
|
/approve-spec f42aef8 |
There was a problem hiding this comment.
Approving: each of the 28 converted waits takes watchAnimations before its action, as the interaction harness README prescribes for a page's first contact, with no assertion changed, and the merge of main since the last review leaves every converted site as it was.
Approved pending CI: CI has not run on this head yet; a maintainer adds the ci:run label so CI runs (it takes effect on the next push, or a close and reopen).
[Automated review]
|
/approve-spec 12002a0 |
|
/approve-spec 18aabfe |
Maintainer impact
On a busy runner, 28 interaction tests can miss the animation they wait for. Each reads it with an unwatched
waitForAnimationright after the action that starts it, as the page's first harness call. That call installs the recorder, so a run that ends before it was never recorded. The wait then fails with the harness's first-contact error, "no animation started on the element". With WebKit on one CPU and 4 workers, main hit this error 17 times in 10 runs of the WebKit tests.Intended invariant
The harness README, "Waiting for an animation": once the recorder runs, a wait reports an animation that started and ended before the test looked. On the page's first contact,
watchAnimations(locator), taken before the action, starts it.Change
watchAnimationson the same locator before its action, then readswatch.started()with the same options. No assertion changes.waitForLenstakes an optionalwatch.Sites: NavigationStack ×9, SegmentedControl ×8, Wheel ×4, Switch ×3, ButtonPressRelease ×2, and one each in ListRowPress and NavigationStackScrollEdge. BottomSheetKeyboardInset's site is left to #10279, which holds that scene at the keyboard report.
Out of scope: under one CPU, 15 of the 17 WebKit tests then fail at their next step in some runs. The motion has already ended when they hold, sample or read it again. That late read is a separate cause, and a follow-up converts those tests to
armHold.Evidence
Scope
Testing
Counts:
armHold.--cpus=4, 1 worker), 20 runs: this change passed 340 of 340 (17 tests; one more skips in WebKit).