-
Notifications
You must be signed in to change notification settings - Fork 144
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: Migrate Registration tests to RTL #1122
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1122 +/- ##
=======================================
Coverage 87.11% 87.11%
=======================================
Files 124 124
Lines 2282 2282
Branches 637 637
=======================================
Hits 1988 1988
Misses 285 285
Partials 9 9 ☔ View full report in Codecov by Sentry. |
a68fc41
to
1fdaad0
Compare
1fdaad0
to
5d33116
Compare
target: { value: '', name: 'country' }, | ||
relatedTarget: { type: 'button', className: 'btn-icon pgn__form-autosuggest__icon-button' }, |
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.
is it working ?
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.
yes its working fine.
const { container } = render(routerWrapper(reduxWrapper(<IntlCountryField {...props} />))); | ||
const countryInput = container.querySelector('input[name="country"]'); | ||
|
||
fireEvent.focus(countryInput); |
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.
In one of test case focus was not working because it behaves async so we need to put in 'act' just want to confirm that is it working fine?
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.
Yup. working perfectly without getting a console error.
const { container } = render(routerWrapper(reduxWrapper(<IntlEmailField {...props} />))); | ||
|
||
const emailInput = container.querySelector('input#email'); | ||
fireEvent.focus(emailInput, { target: { value: '', name: 'email' } }); |
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.
same as above
Description
Migrate existing tests for the 'Registration' functionality from Enzyme to React Testing Library (RTL).
JIRA
VAN-1769
How Has This Been Tested?
Locally