-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Test Modernization] Modernizing Filters and Form tests. #4434
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
Conversation
size-limit report
|
6d7aed4 to
b4d79e8
Compare
| expect(resourceFilters.find(Popover).first().props().active).toBe(true); | ||
| trigger(shortcut, 'onClick'); | ||
| expect(resourceFilters.find(Popover).first().props().active).toBe(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.
This test wasn't modernized. See the PR's description (disclaimer) to find out why.
alex-page
left a comment
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.
@lucabezerra do we have an issue or PR to address the find fix? I don't want to forget about this legacy test. Happy to merge this in its current state.
|
@alex-page I was talking to @BPScott about this and his idea was that we'd eventually search for the In the meantime I'm going to attempt fixing this |
Disclaimer
There is one test in theFilters.test.tsxsuite that wasn't modernized. It seems like we've found a bug onreact-testingregarding using.find()to search for components in a tree that contains React Fragments (it can't find the component if it's a few levels deep). Decided to submit the PR anyways as all the other tests have been modernized.UPDATE: disclaimer no longer needed, as the aforementioned suite has already been modernized here: #4458
WHY are these changes introduced?
Modernizes tests to use the new modern framework (
{mountWithApp}fromtest-utilities).WHAT is this pull request doing?
Updates tests using
{mountWithAppProvider}fromtest-utilities/legacyto use{mountWithApp}fromtest-utilities