-
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
refactor: depreciate enzyme #1128
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1128 +/- ##
==========================================
- Coverage 87.12% 87.04% -0.09%
==========================================
Files 124 124
Lines 2284 2284
Branches 638 638
==========================================
- Hits 1990 1988 -2
- Misses 285 287 +2
Partials 9 9 ☔ View full report in Codecov by Sentry. |
expect(field.type()).toEqual('select'); | ||
expect(fieldRenderer.find('label').text()).toEqual('Year of Birth'); | ||
expect(value).toEqual(1997); | ||
expect(input.type).toEqual('select-one'); |
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 has it changed to select-one
instead of select
?
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.
It should be select
, but the element was giving the type select-one
, although I tried to debug the element and found the input type was select
expect(value).toEqual(1997); | ||
expect(input.type).toEqual('select-one'); | ||
expect(label.textContent).toContain(fieldData.label); | ||
expect(value).toEqual('1997'); |
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.
Also, why does RTL expect the value to be a string?
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 our component, the value was set in integer, but in the unit test in changeHandler
function, the value was getting in string.
move unit test from enzyme to RTL VAN-1792
6c1d94f
to
69c7742
Compare
move unit tests from enzyme to RTL.
VAN-1792