-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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(fe): migrate 4 Enzyme-based tests to RTL #31634
chore(fe): migrate 4 Enzyme-based tests to RTL #31634
Conversation
Signed-off-by: hainenber <dotronghai96@gmail.com>
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.
I've completed my review and didn't find any issues... but I did find this rooster.
\\
(o>
\\_//)
\_/_)
_|_
Need a new review? Comment
/korbit-review
on this PR and I'll review your latest changes.Korbit Guide: Usage and Customization
Interacting with Korbit
- You can manually ask Korbit to review your PR using the
/korbit-review
command in a comment at the root of your PR.- You can ask Korbit to generate a new PR description using the
/korbit-generate-pr-description
command in any comment on your PR.- Too many Korbit comments? I can resolve all my comment threads if you use the
/korbit-resolve
command in any comment on your PR.- Chat with Korbit on issues we post by tagging @korbit-ai in your reply.
- Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.
Customizing Korbit
- Check out our docs on how you can make Korbit work best for you and your team.
- Customize Korbit for your organization through the Korbit Console.
Current Korbit Configuration
General Settings
Setting Value Review Schedule Automatic excluding drafts Max Issue Count 10 Automatic PR Descriptions ❌ Issue Categories
Category Enabled Naming ✅ Database Operations ✅ Documentation ✅ Logging ✅ Error Handling ✅ Systems and Environment ✅ Objects and Data Structures ✅ Readability and Maintainability ✅ Asynchronous Processing ✅ Design Patterns ✅ Third-Party Libraries ✅ Performance ✅ Security ✅ Functionality ✅ Feedback and Support
Note
Korbit Pro is free for open source projects 🎉
Looking to add Korbit to your team? Get started with a free 2 week trial here
packages/superset-core
to RTLpackages/superset-core
to RTL
Running CI 🤞 |
@rusackas I think the CI was failing due to Docker Hub token issue previously. Do you think it's worth another shot running? 👀 |
I think if you rebase the PR now, it'll work. |
All green :D |
Signed-off-by: hainenber <dotronghai96@gmail.com>
packages/superset-core
to RTLpackages/superset-core
to RTL
packages/superset-core
to RTL
re-bump :D |
Hey hey! I'd forgotten about this PR, sorry! I'm working on the same effort (killing enzyme) and have this PR going: In your PR you get a couple of tests that I also worked on, but you have a couple I haven't gotten to yet. It looks like your PR is failing CI on a Cypress test (our next nemesis!) - I just started a re-run of it to see if it passes now. If not, would you rather fix and merge your PR before I merge mine, or would you rather close this and I'll copy over your work on the tests I haven't converted yet? |
Let me rebase the branch to be up-to-date with |
import { triggerResizeObserver } from 'resize-observer-polyfill'; | ||
import { promiseTimeout, WithLegend } from '@superset-ui/core'; | ||
import { render } from '@testing-library/react'; |
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.
please import from spec/helpers/testing-library
instead. Applies to all files - you won't need to import additional stuff like @testing-library/jest-dom
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.
@hainenber can get that here, or (in theory) the linting rule on my PR should help sweep that up.
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.
Gotchu. Will push new fixes in around upcoming 5s
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.
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.
I also noticed that in Evan also employed direct testing-library
import in the PR :D
superset-ui-core
is built different, I guess.
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.
Hmm can you try to add "../spec/**/*"
to the include
array in superset-ui-core/tsconfig.ts
?
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.
The path to spec might be different but you know what I mean 😄
Signed-off-by: hainenber <dotronghai96@gmail.com>
chore(fe): migrate 4 Enzyme-based tests to RTL
SUMMARY
Part of ongoing effort to refactor away Enzyme-based unit test to RTL
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TESTING INSTRUCTIONS
The CI checks should all pass for this particular PR
ADDITIONAL INFORMATION