HDDS-15640. Upgrading msw to 2.14.6 and vitest to 3.2.6#10577
Open
jasonosullivan34 wants to merge 2 commits into
Open
HDDS-15640. Upgrading msw to 2.14.6 and vitest to 3.2.6#10577jasonosullivan34 wants to merge 2 commits into
jasonosullivan34 wants to merge 2 commits into
Conversation
| retryDelay: 0, | ||
| }), | ||
| }; | ||
| }); |
Contributor
Author
There was a problem hiding this comment.
Chose to partially mock the useApiData hook to speed up the relevant error tests
| 'capacityOzoneUsed': 'capacity-ozone-used', | ||
| 'capacityNonOzoneUsed': 'capacity-non-ozone-used', | ||
| 'capacityRemaining': 'capacity-remaining', | ||
| 'capacityPreAllocated': 'capacity-pre-allocated', |
Contributor
Author
There was a problem hiding this comment.
I had to work around the Statistic component for capacity overview. Not possible to set data-testid using the current antd version
| const statistic = titleEl.closest('.cluster-card-statistic'); | ||
| expect(statistic).not.toBeNull(); | ||
| return statistic!; | ||
| }; |
Contributor
Author
There was a problem hiding this comment.
Had to get a bit creative to select the correct card to assert on
| decommissionAPI.refetch(); | ||
| datanodesAPI.refetch(); | ||
| decommissionAPI.refetch().catch(() => {}); | ||
| datanodesAPI.refetch().catch(() => {}); |
Contributor
Author
There was a problem hiding this comment.
Errors were being thrown in the test run output. This workaround was already being used by modelData.execute() in assistant.tsx
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.
What changes were proposed in this pull request?
HDDS-15640. Upgrading msw to 2.14.6 and vitest to 3.2.6
Please describe your PR in detail:
Upgrading msw and vitest dev dependencies
Fixing broken tests
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15640
How was this patch tested?
Unit tests
Local dev builds
@spacemonkd @adoroszlai