-
Notifications
You must be signed in to change notification settings - Fork 153
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 welcome page and recommendations tests to RTL #1116
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1116 +/- ##
=======================================
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. |
c3690fd
to
7e3729a
Compare
|
||
expect(progressiveProfilingPage.find('a.pgn__hyperlink').text()).toEqual('Learn more about how we use this information.'); | ||
const infoMessage = 'Learn more about how we use this information.'; | ||
const findByTextWithClass = (container, text, className) => Array.from(container.querySelectorAll(`.${className}`)).find( |
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 can't we directly find by text?
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.
Yeah, we can use it like this. Sure i will change it.
const { getByText } = render(reduxWrapper(<IntlProgressiveProfilingPage />));
const learnMoreButton = getByText('Learn more about how we use this information.');
expect(learnMoreButton).toBeDefined();
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.
@syedsajjadkazmii I have changed it.
7e3729a
to
37ec14b
Compare
Description
This task involves migrating our existing tests for the 'Welcome Page' and 'Recommendations' functionalities from Enzyme to React Testing Library (RTL).
JIRA
VAN-1772