Repository navigation
test(Slider): the slow-release test runs on a fixed track length - #11547
Conversation
WebKit takes one long frame when a touch ends straight out of a slow move at some track lengths (about 335 px), with no page work in it, and the harness reads that frame as a stalled lift. The test now fixes the track at 320 px, so it tests the release and not the page's width. The gesture is unchanged.
|
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 |
|---|---|---|---|
| Slider · Storybook | 114.3 kB (0) · 8.9 kB CSS (0) | 2,447 (0) | ✓ · ✓ · ✓ |
Package size: no published package changed; no new dependencies.
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
The stalling geometry stays in the spec as test.fixme, so a fix for the WebKit stall can be proven, and the pinned case shares one body with it, so its coast assertion is the same. The comment says the 320 px pin is temporary.
There was a problem hiding this comment.
Approved pending CI: the interaction legs have not run on this head yet, and they run once the pull request leaves draft.
The 320 px pin keeps the slow-release gesture and assertions unchanged, the pinned case passes repeatedly in Chromium, and the control measures exactly 320 px at both the 402 px and 393 px phone widths. Nothing blocks; three optional suggestions:
- The
test.fixmeat line 664 also skips Chromium, where the 393 px case passes; callingtest.fixme(browserName === 'webkit', …)inside the test keeps that coverage, and the comment above it could say the case checks a fix once the fixme is removed, rather than that it proves one. expectSlowReleaseNotToCoastcan destructurecontrolfromopenSliderinstead of rebuilding the same XPath locator.- The lift stall comes from the test reading the value inside
onEventat the last move, which holds the lift back by about two frames; the harness suggests recording that read in a page listener instead, which might make the pin unnecessary.
Claims and files checked
- Claim: the slow-release case runs on a fixed 320 px track. Verified: the pin in the helper, and a 320 px control measured at both phone widths.
- Claim: the gesture and coast assertions are unchanged and both cases share one body that lifts while still moving. Verified: the helper's body is the earlier test body plus the pin.
- Claim: the 393 px case is kept as a known failure. Verified: the new
test.fixmecase. - Claim: no product code changes. Verified: only this spec file changes.
- Claim: a track of about 335 px, as #4050 produces at the default phone width, stalls the lift in headless WebKit. Consistent: a 393 px viewport gives a 334.7 px control and a 402 px one 343.7 px; the WebKit result was not reproduced in this review.
- Claim: the harness reports the long frame as a stalled lift. Consistent with the harness, which raises that error when the test's own work before the lift pushes the lift past its 40 ms stillness interval.
- Claim: the instrumented runs found no page work in the long frame, and Safari on a real iPhone shows no hitch. Taken as stated in the description.
- Claim: the Slider record's touch-tracking requirement and its verification row govern the test, and the record is unchanged. Verified.
- Claim: CI's WebKit and Chromium interaction legs run this test at 320 px. Verified in the configuration; they have not run on this draft yet.
- Claim: the scope is Slider tests only, with no internal context. Verified.
- File
packages/core/src/Slider/__tests__/SliderTouch.interaction.browser.spec.ts: the three optional suggestions above.
|
|
||
| // The stalling geometry, kept as a known failure: a 393 px phone width gives | ||
| // the track about 335 px. It proves the fix for the WebKit stall above. | ||
| test.fixme('a slow release does not coast on a 393 px phone width', async ({ |
There was a problem hiding this comment.
Optional: this test.fixme also skips Chromium, where the 393 px case passes. Calling test.fixme(browserName === 'webkit', 'headless WebKit stalls the lift at a 335 px track') inside the test keeps the Chromium coverage. The comment above could say the case checks a fix once the fixme is removed, since a fixme case never runs.
| await thumb | ||
| .locator( | ||
| 'xpath=ancestor::*[contains(@class, "astryx-slider-control")][1]', | ||
| ) |
There was a problem hiding this comment.
Optional: openSlider already returns this locator as control, so the helper can destructure it instead of repeating the XPath.
|
/approve-spec 789322f |
Primary intent
Test fix:
SliderTouch.interaction.browser.spec.ts's "a slow release does not coast" runs on a fixed 320 px track, so the outcome no longer depends on the page's width. The gesture and the coast assertions are unchanged: both cases share one body, which releases while moving slowly, with no still hold before the lift. The 393 px phone-width case stays in the spec astest.fixme, documenting the headless stall. No product code changes.User or maintainer impact
Maintainers: the WebKit interaction leg stops failing this test whenever an unrelated change moves the Brightness slider's track to about 335 px. #4050 does that by reserving room for its value label at the default 402 px phone width. Readers: no change.
Problem and solution fit
In Playwright's WebKit, when a touch ends straight out of a slow move and the track is about 335 px, the engine takes one 73–143 ms frame about 10 ms after
pointerup. The harness reads that frame as a stalled lift (TouchLiftStallError). Main fails the same way at a 393 px phone width and passes at 402 (track 344 px).Instrumented runs found no page cause:
classandstyleattribute in the slider is frozen frompointerup, so nothing on the page changes at the lift.Safari on a real iPhone (iPhone 14, iOS 26.2, at a 390 px width, track about 332 px) shows no hitch at the lift, 3 of 3 takes: the release commits on time against hold-still controls. So the long frame belongs to the headless WebKit build, and the test fixes its own geometry instead. The pin is temporary and goes when that engine stops stalling.
Authority
component:SliderFR7 (touch tracking, release without coast) and its verification row, which names this test. The record is unchanged.Change and evidence
packages/core/src/Slider/__tests__/SliderTouch.interaction.browser.spec.ts:expectSlowReleaseNotToCoast(page, trackPx?)holds the gesture and the assertions. The pinned case sets the slider control'sflexto0 0 320pxand waits two frames before the gesture; thetest.fixmecase runs at a 393 px width with no pin. A comment states the engine reason and the real-device result.Scope
Components: Slider (test only)
Testing
Writing rubric results
Owner and land path
Owner: the Astryx fix loop, lane 3. Specs, CodeBunny at its head, green CI and the main-CI guardian's conditions (met); the drain merges. #4050 follows it.