Skip to content
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

test(RHINENG-3032): Migrate from Enzyme to RTL #2033

Merged
merged 53 commits into from
Feb 6, 2024

Conversation

gkarat
Copy link
Contributor

@gkarat gkarat commented Sep 27, 2023

Fixes https://issues.redhat.com/browse/RHINENG-3032.

This mirgates all unit tests to the RTL library.

  • Many tests were moved from asserting against snapshots to specific queries depending on what each test is trying to verify. The reason is that RTL snapshot generation is different to enzyme's and does not support shallow rendering which made many tests unfunctional.
  • All enzyme and its eco-system packages are removed.
  • setupTests.js was cleaned and now contains only the most necessary mocks/globals.
  • All tests were checked with the testing-library/react plugin for eslint.

@gkarat gkarat added the dependencies Pull requests that update a dependency file label Sep 27, 2023
@gkarat gkarat self-assigned this Sep 27, 2023
@gkarat
Copy link
Contributor Author

gkarat commented Jan 20, 2024

I might introduce minor changes or clean-up again, but I believe the PR is ready for review.

@gkarat gkarat requested review from bastilian and a team February 1, 2024 13:09
@gkarat gkarat requested review from bastilian and a team February 6, 2024 12:07
@gkarat
Copy link
Contributor Author

gkarat commented Feb 6, 2024

Follow-up: #2141

Copy link
Member

@bastilian bastilian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! At least as far as I can see. Thank you @gkarat!

@gkarat gkarat merged commit 511d0a5 into RedHatInsights:master Feb 6, 2024
2 checks passed
@gkarat gkarat deleted the rtl branch February 6, 2024 13:01
@gkarat gkarat restored the rtl branch February 6, 2024 13:13
@gkarat
Copy link
Contributor Author

gkarat commented Feb 6, 2024

🎉 This PR is included in version 1.64.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@gkarat gkarat added the released label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file released tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants