-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Use vitest-browser-react
and browserUserEvent
#3629
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3629 +/- ##
==========================================
+ Coverage 91.02% 91.83% +0.81%
==========================================
Files 48 48
Lines 3453 3453
Branches 667 686 +19
==========================================
+ Hits 3143 3171 +28
+ Misses 310 282 -28 |
@@ -707,7 +707,7 @@ export default [ | |||
'testing-library/prefer-presence-queries': 1, | |||
'testing-library/prefer-query-by-disappearance': 1, | |||
'testing-library/prefer-query-matchers': 0, | |||
'testing-library/prefer-screen-queries': 1, | |||
'testing-library/prefer-screen-queries': 0, |
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.
Had to disable it as this complains about page...
name: 'Name', | ||
renderEditCell: textEditor, | ||
editorOptions: { | ||
commitOnOutsideClick: false |
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.
Added this so we can test the blur event
await new Promise(requestAnimationFrame); | ||
}); | ||
await user.pointer({ keys: '[/MouseLeft]' }); | ||
await userEvent.click(saveButton, { delay: 10 }); |
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.
😎
await waitFor(() => { | ||
expect(col1Input).not.toBeInTheDocument(); | ||
expect(col1Input.query()).not.toBeInTheDocument(); | ||
}); |
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.
Need a better way
vitest-browser-react
and browserUserEvent
Co-authored-by: Nicolas Stepien <[email protected]>
https://github.com/vitest-dev/vitest-browser-react