Remove "Succeeded warnings" text
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user