Conversation
Collaborator
Author
|
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.  ### 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.
Collaborator
Author
|
Opening this PR (finally) now that the testing issue has been resolved |
pdp2121
approved these changes
Apr 30, 2024
2 tasks
Collaborator
Author
|
Resolving the build error is more easily done after #984 |
achowdhry-ripple
approved these changes
May 15, 2025
Collaborator
achowdhry-ripple
left a comment
There was a problem hiding this comment.
thank you for this cleanup
This file contains hidden or 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
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.