migrate l10n, /placeable, /project, /resource, /search, /user tests to RTL (partial)#4200
Merged
eemeli merged 3 commits intoJun 9, 2026
Conversation
eemeli
requested changes
Jun 9, 2026
eemeli
left a comment
Member
There was a problem hiding this comment.
Looks good, see inline for a few small questions/fixes.
Comment on lines
+26
to
+27
| expect(container.querySelector('span.path')).toBeInTheDocument(); | ||
| expect(container.querySelector('span.percent')).toBeInTheDocument(); |
Member
There was a problem hiding this comment.
The previous test checked that there was only one span. Is the behaviour now the same, or are there now two spans? If there's only one, shouldn't we check for span.path.percent?
Collaborator
Author
There was a problem hiding this comment.
Previously too we were checking for the presence of two spans, one in ResourceItem.tsx and other one hidden by enzyme's shallow render within ResourcePercent component.
expect(wrapper.find('span')).toHaveLength(1); expect(wrapper.find(ResourcePercent)).toHaveLength(1);
now that i look at it again i think we can replace the queryselector with rtl approach
Comment on lines
+442
to
+444
| <Localized | ||
| id='search-FiltersPanel--toggle-filters-panel' | ||
| attrs={{ 'aria-label': true }} |
| return user?.isAuthenticated ? ( | ||
| <div className='user-notifications-menu'> | ||
| <div className='selector' onClick={handleClick}> | ||
| <div className='selector' role='button' onClick={handleClick}> |
- Updated ResourceItem tests to include additional props and verify rendered output. - Refactored UserNotification tests to use getByText for better readability and accuracy in assertions. - Standardized variable naming for consistency in UserNotificationsMenu tests.
eemeli
approved these changes
Jun 9, 2026
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.
Continuation of previous MR #4023 the migration of enzyme test to @testing-library/react under task #3767
Some of the tests under /project, /search, and /user have not yet been migrated due to their complexity.