test(desktop): deflake mid-scroll older-history spinner smoke test#1632
Merged
Conversation
The "older-history spinner stays visible in viewport while fetching mid-scroll" smoke test drove the timeline with three mouse.wheel gestures and fixed 100ms sleeps, then asserted scrollTop > 8. Wheel delta handling varies across CI runners, so the final net position sometimes landed at scrollTop 0 — failing the assertion on all retries and intermittently breaking main (e.g. runs 28915175821, 28891719863) with no related code change. Replace the wheel choreography with direct scrollTop writes: park at 150 to trigger the older fetch, wait for the spinner, then jump one viewport down while the fetch is still in flight. Deterministic mid-scroll position, same assertion targets (spinner visible + pinned within the viewport away from the top). Verified locally: 10/10 repeats pass; full scroll-history smoke suite passes. Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
mainCI is intermittently red on Desktop Smoke E2E (4): thescroll-history.spec.tstest "older-history spinner stays visible in viewport while fetching mid-scroll" failsexpect(scrollTop).toBeGreaterThan(8)with0on all 3 retries (runs 28915175821, 28891719863). The test file hadn't changed since #1533 and the failing commits didn't touch scroll code — it's test flake, not a product regression.What
The test drove the timeline with three
mouse.wheelgestures separated by fixed 100ms sleeps, then asserted the timeline ended up mid-scroll. Wheel delta handling varies across CI environments, so the net position sometimes landed atscrollTop 0— the one position the test must avoid.Replaced the wheel choreography with deterministic
scrollTopwrites:scrollTop = 150to trigger the older-history fetch (same pattern the sibling "never overlap" test uses),Same assertion targets as before — only the flaky input choreography changed.
Verification
--repeat-each=10on the target test: 10/10 passscroll-history.spec.tssmoke suite: 15/15 passpnpm typecheck,pnpm lint,pnpm check: clean(Note: two other recent red runs on main were runner-infra apt failures installing Playwright deps —
packages.microsoft.comclearsign errors — self-healing, not addressable in-repo.)