Remove "Succeeded warnings" text

This commit is contained in:
Robert
2023-04-18 13:34:55 +01:00
parent 8291e52a9b
commit aa9e2fb5fc
2 changed files with 1 additions and 18 deletions

View File

@@ -53,15 +53,8 @@ export const VariantAnalysisStats = ({
return "Stopped";
}
if (
variantAnalysisStatus === VariantAnalysisStatus.Succeeded &&
skippedRepositoryCount > 0
) {
return "Succeeded warnings";
}
return "Succeeded";
}, [variantAnalysisStatus, skippedRepositoryCount]);
}, [variantAnalysisStatus]);
const duration = useMemo(() => {
if (!completedAt) {

View File

@@ -108,20 +108,10 @@ describe(VariantAnalysisStats.name, () => {
expect(screen.getByText("Stopped")).toBeInTheDocument();
});
it("renders a succeeded warnings text when the variant analysis status is succeeded and skipped repositories count is greater than zero", () => {
render({
variantAnalysisStatus: VariantAnalysisStatus.Succeeded,
skippedRepositoryCount: 5,
});
expect(screen.getByText("Succeeded warnings")).toBeInTheDocument();
});
it("renders a succeeded text when the variant analysis status is succeeded", () => {
render({ variantAnalysisStatus: VariantAnalysisStatus.Succeeded });
expect(screen.getByText("Succeeded")).toBeInTheDocument();
expect(screen.queryByText("Succeeded warnings")).not.toBeInTheDocument();
});
it("does not render the duration when the completedAt is not set", () => {