Implement `userEvent.wheel` in interactivity api
Clear and concise description of the problem
Allow a test to scroll the wheel in browser mode. We want to use wheel within a number input to change the value.
Suggested solution
Hook up to Playwright's wheel
Alternative
No response
Additional context
See https://github.com/testing-library/user-event/issues/475 for existing feature request on testing-library/user-event.
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
I was so confused about all these layers of abstractions, running in circles between "@testing-library/vue", "vitest/browser" and "vitest-browser-vue", even asked LLMs (which I usually don't do) both of which got stuck in a loop of broken rewritings.
Turns out, the thing is simply not implemented yet, ahh.
Are there workarounds? Like, using underlying Playwright API directly? I'm still not sure how any of this composes together.
I'm no longer have access to the project that I needed this on, but iirc we had a separate jsdom workspace for tests that need unimplemented features and used fireEvent.wheel for this as a workaround
Searching the whole vitest workspace for a similar event named tripleClick yields "64 results - 16 files". Seems like adding support for scroll/wheel would be involve quite a lot of work, preferably from someone who knows what are they doing 👀
For the reference, Webdriver implemented it "a while ago:"
- https://github.com/w3c/webdriver/pull/1410
- https://github.com/servo/servo/issues/23180
- https://w3c.github.io/webdriver/#wheel-input-source