jasonosullivan34 commented on code in PR #10577:
URL: https://github.com/apache/ozone/pull/10577#discussion_r3452598515
##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/__tests__/Overview.test.tsx:
##########
@@ -90,66 +106,60 @@ describe.each([
});
it('Capacity card has the correct capacity data', () => {
- const capacityOzoneUsed =
screen.getByTestId(overviewLocators.capacityOzoneUsed);
- const capacityNonOzoneUsed =
screen.getByTestId(overviewLocators.capacityNonOzoneUsed);
- const capacityRemaining =
screen.getByTestId(overviewLocators.capacityRemaining);
- const capacityPreAllocated =
screen.getByTestId(overviewLocators.capacityPreAllocated);
+ const getStatistic = (title: string) => {
+ const titleEl = screen.getByText(title);
+ const statistic = titleEl.closest('.cluster-card-statistic');
+ expect(statistic).not.toBeNull();
+ return statistic!;
+ };
Review Comment:
Had to get a bit creative to select the correct card to assert on
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]