-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Test Modernization]: Add test modernization to CalloutCard, Caption, CheckableButton, Resizer, VideoThumbnail #4387
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
|
src/components/TextField/components/Resizer/tests/Resizer.test.tsx
Outdated
Show resolved
Hide resolved
| ); | ||
| element.find(Checkbox).first().simulate('click', { | ||
|
|
||
| element.find(Checkbox)!.find('input')!.trigger('onKeyUp', { |
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 is another change, I am open for suggestions :)
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.
My feeling is that there should be a test that checks that the function is passed to the Checkbox component, but not testing if it’s called, as this is already tested in Checkbox.test.tsx (As discussed on Slack)
rdott
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.
🚀
WHY are these changes introduced?
I am updating existing tests for CalloutCard, Caption, CheckableButton, Resizer, VideoThumbnail components to use the new modern framework.
WHAT is this pull request doing?
Part of test modernization (https://docs.google.com/spreadsheets/d/1GBuEZbOpVYJLNISK7gL69DU8rCxocn5L5GYaKtPXPbU/edit#gid=1498187033), updating tests using {mountWithAppProvider} from 'test-utilities/legacy' to {mountWithApp} from 'test-utilities'.