Skip to content

test: poll for the async wheel event in the user-event fixture#10732

Merged
sheremet-va merged 1 commit into
mainfrom
fix/stabilize-flaky-browser-tests
Jul 7, 2026
Merged

test: poll for the async wheel event in the user-event fixture#10732
sheremet-va merged 1 commit into
mainfrom
fix/stabilize-flaky-browser-tests

Conversation

@sheremet-va

@sheremet-va sheremet-va commented Jul 7, 2026

Copy link
Copy Markdown
Member

Trying expect.poll to try the expect check until it succeeds. We already do the same thing in other places

The `scrolls with custom delta values` cases asserted
`expect(wheel).toHaveBeenCalledOnce()` synchronously right after dispatching
the wheel event, but the browser delivers the event asynchronously — so under
load (notably Firefox in CI) the spy was occasionally still uncalled, flaking
the `specs/runner.test.ts > user-event` meta-test. Poll for the call like the
sibling default-delta cases already do.
@netlify

netlify Bot commented Jul 7, 2026

Copy link
Copy Markdown

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit f26e9c0
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6a4d06adb15ac700087728e3
😎 Deploy Preview https://deploy-preview-10732--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@sheremet-va sheremet-va changed the title fix(browser): poll for the async wheel event in the user-event fixture test: poll for the async wheel event in the user-event fixture Jul 7, 2026
@sheremet-va sheremet-va merged commit 6198fd2 into main Jul 7, 2026
28 of 29 checks passed
@sheremet-va sheremet-va deleted the fix/stabilize-flaky-browser-tests branch July 7, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant