Skip to content

HDDS-15640. Upgrading msw to 2.14.6 and vitest to 3.2.6#10577

Open
jasonosullivan34 wants to merge 2 commits into
apache:masterfrom
jasonosullivan34:HDDS-15640-upgrading-msw-and-vitest
Open

HDDS-15640. Upgrading msw to 2.14.6 and vitest to 3.2.6#10577
jasonosullivan34 wants to merge 2 commits into
apache:masterfrom
jasonosullivan34:HDDS-15640-upgrading-msw-and-vitest

Conversation

@jasonosullivan34

@jasonosullivan34 jasonosullivan34 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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

retryDelay: 0,
}),
};
});

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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!;
};

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Had to get a bit creative to select the correct card to assert on

decommissionAPI.refetch();
datanodesAPI.refetch();
decommissionAPI.refetch().catch(() => {});
datanodesAPI.refetch().catch(() => {});

@jasonosullivan34 jasonosullivan34 Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Errors were being thrown in the test run output. This workaround was already being used by modelData.execute() in assistant.tsx

@adoroszlai adoroszlai requested a review from spacemonkd June 22, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant