Add labels to icons

This commit is contained in:
Robert
2023-04-18 14:23:53 +01:00
parent 3db0f2bdfe
commit 276d675242
2 changed files with 9 additions and 9 deletions

View File

@@ -28,7 +28,7 @@ export const VariantAnalysisRepositoriesStats = ({
return (
<>
0<HorizontalSpace size={2} />
<ErrorIcon />
<ErrorIcon label="Variant analysis failed" />
</>
);
}
@@ -43,13 +43,13 @@ export const VariantAnalysisRepositoriesStats = ({
{showError && (
<>
<HorizontalSpace size={2} />
<ErrorIcon />
<ErrorIcon label="Some analyses failed" />
</>
)}
{showWarning && !showError && (
<>
<HorizontalSpace size={2} />
<WarningIcon />
<WarningIcon label="Some repositories were skipped" />
</>
)}
{!showError &&

View File

@@ -55,7 +55,7 @@ describe(VariantAnalysisStats.name, () => {
expect(
screen.getByRole("img", {
name: "Warning",
name: "Some repositories were skipped",
}),
).toBeInTheDocument();
});
@@ -65,7 +65,7 @@ describe(VariantAnalysisStats.name, () => {
expect(
screen.getByRole("img", {
name: "Error",
name: "Variant analysis failed",
}),
).toBeInTheDocument();
});
@@ -89,7 +89,7 @@ describe(VariantAnalysisStats.name, () => {
expect(
screen.getByRole("img", {
name: "Error",
name: "Some analyses failed",
}),
).toBeInTheDocument();
});
@@ -103,7 +103,7 @@ describe(VariantAnalysisStats.name, () => {
expect(
screen.getByRole("img", {
name: "Error",
name: "Some analyses failed",
}),
).toBeInTheDocument();
});
@@ -117,12 +117,12 @@ describe(VariantAnalysisStats.name, () => {
expect(
screen.getByRole("img", {
name: "Error",
name: "Some analyses failed",
}),
).toBeInTheDocument();
expect(
screen.queryByRole("img", {
name: "Warning",
name: "Some repositories were skipped",
}),
).not.toBeInTheDocument();
});