-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: remove support for user provided MouseEventInit
#784
Conversation
BREAKING CHANGE: `init` parameter has been removed from these APIs: - `userEvent.click` - `userEvent.dblClick` - `userEvent.tripleClick` - `userEvent.hover` - `userEvent.unhover` - `userEvent.selectOptions` - `userEvent.deselectOptions` BREAKING CHANGE: `userEvent.upload` no longer supports `clickInit` as part of its `init` parameter.
6dd2605
to
3720704
Compare
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 3720704:
|
Codecov Report
@@ Coverage Diff @@
## alpha #784 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 64 64
Lines 1394 1393 -1
Branches 545 544 -1
=========================================
- Hits 1394 1393 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favor of this change. I never liked this API 👍
🎉 This PR is included in version 14.0.0-alpha.12 🎉 The release is available on: Your semantic-release bot 📦🚀 |
BREAKING CHANGE: `init` parameter has been removed from these APIs: - `userEvent.click` - `userEvent.dblClick` - `userEvent.tripleClick` - `userEvent.hover` - `userEvent.unhover` - `userEvent.selectOptions` - `userEvent.deselectOptions` BREAKING CHANGE: `userEvent.upload` no longer supports `clickInit` as part of its `init` parameter.
BREAKING CHANGE:
init
parameter has been removed from these APIs:userEvent.click
userEvent.dblClick
userEvent.tripleClick
userEvent.hover
userEvent.unhover
userEvent.selectOptions
userEvent.deselectOptions
BREAKING CHANGE:
userEvent.upload
no longer supportsclickInit
as part of its
init
parameter.What:
Remove
init
parameters forEventInit
of mouse/pointer events.Why:
The
init
parameters are escape hatches.They were used for different events that don't necessarily share the same properties.
The new pointer implementation renders supplying own
MouseEventInit
properties obsolete as the events are created according to specs / living standard.If our code lacks non-deprecated features from the specs, we should add them.
If our users want to test features outside of the specs, they should be on their own using lower level implementations.
The
init
parameter encourages bad practice as it makes it convenient to just tweak the events instead of describing a user interaction that might lead up to those events.Checklist: