Skip to content
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

fix: create MouseEvents per createEvent #781

Merged
merged 1 commit into from
Nov 15, 2021
Merged

Conversation

ph-fritsche
Copy link
Member

What:

Remove fake mouse/pointer event classes extending MouseEvent.

Why:

Closes #768

How:

Create event per createEvent from @testing-library/dom and then apply the properties which are unavailable in jsdom.
Edit snapshot util to properly reflect the mouse/pointer events.

Checklist:

  • Tests
  • Ready to be merged

@codesandbox-ci
Copy link

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 ba109f0:

Sandbox Source
userEvent-PR-template Configuration
UIEvent extends Event Issue #768

@codecov
Copy link

codecov bot commented Nov 13, 2021

Codecov Report

Merging #781 (ba109f0) into alpha (e715c81) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             alpha      #781   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           66        65    -1     
  Lines         1394      1385    -9     
  Branches       549       546    -3     
=========================================
- Hits          1394      1385    -9     
Impacted Files Coverage Δ
src/utils/pointer/firePointerEvents.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e715c81...ba109f0. Read the comment docs.

@ph-fritsche ph-fritsche linked an issue Nov 13, 2021 that may be closed by this pull request
@ph-fritsche ph-fritsche added this to the userEvent v14 milestone Nov 13, 2021
@ph-fritsche ph-fritsche merged commit 8de88f4 into alpha Nov 15, 2021
@ph-fritsche ph-fritsche deleted the fix-mouseevent branch November 15, 2021 07:46
@github-actions
Copy link

🎉 This PR is included in version 14.0.0-alpha.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can not dispatch MouseEvent in older jsdom
1 participant