-
Notifications
You must be signed in to change notification settings - Fork 77
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: begin the switch to RTL #945
Open
mvadari
wants to merge
17
commits into
staging
Choose a base branch
from
rtl
base: staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tests should be resolved by #972 |
mvadari
added a commit
that referenced
this pull request
Apr 16, 2024
## High Level Overview of Change This PR fixes the `LedgersPage` tests so they stop failing intermittently/in some PRs (like #945). ### Context of Change The `LedgersPage` tests fail for me locally. ![image](https://github.com/ripple/explorer/assets/8029314/f125f0b4-fa3d-4ca9-884f-a3d79637779e) ### Type of Change - [x] Bug fix (non-breaking change which fixes an issue) - [x] Tests (You added tests for code that already exists, or your new feature included in this PR) ### TypeScript/Hooks Update N/A - too complicated, not worth doing here. ## Test Plan Tests pass locally now.
Opening this PR (finally) now that the testing issue has been resolved |
pdp2121
approved these changes
Apr 30, 2024
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
High Level Overview of Change
This PR introduces the React Testing Library (RTL) to the Explorer's testing system, beginning the rollout of replacing Enzyme. It is a more modern testing library, and supports later versions of React.
Three test files are switched over to use RTL:
Account
,Currency
, andAmount
.Only tests are affected by this change.
Context of Change
This switch is necessary to upgrade to React v18 (#668), which has a lot of features that would clean up the codebase a lot. Enzyme stopped supporting React at v16, and even v17 support requires a hacky adapter.
This PR replaces #530 - merge commits got messy and complicated, and it was easier to re-apply all the changes to the updated codebase.
Type of Change
Codebase Modernization
Test Plan
Tests pass locally and in CI.
Future Tasks
There are a total of 149 test files - not all of them use enzyme, but most do. This PR switches 3 of them over to RTL, to provide a template. The rest of the enzyme tests still need to be switched over.
A script could likely be written to handle most of the migration.