-
Notifications
You must be signed in to change notification settings - Fork 40
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
chore: migrate to react 18 #582
Conversation
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.
Looks like react-testing-library
does not give a nice way to query by class name as they don't want us to do it:
Note that using this as an escape hatch to query by class or id is not recommended because they are invisible to the user
If you find yourself using
container
to query for rendered elements then you should reconsider! The other queries are designed to be more resilient to changes that will be made to the component you're testing
It does not seem to worth fixing these in old tests, though.
What's done:
React 16
->React 18
Enzyme
->@testing-library/react
test/unit/lib/static/components/modals/screenshot-accepter/index.jsx
was rewritten from ground up.rc-resize-observer
->@react-hook/resize-observer
styled-components
that were used in just one place