Remove .DS_Store from version control and update .gitignore. Enhance BatchCaseDetailDrawer and BatchRunCompletedView components to support error handling and improved UI for displaying test case statuses. Add functionality for editing and rerunning test cases. Update TestCasesPage to handle initial case selection. Refactor related components for better maintainability.
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
"use client";
|
||||
|
||||
import { CheckCircle2, Circle, Loader2, XCircle } from "lucide-react";
|
||||
import {
|
||||
CheckCircle2,
|
||||
Circle,
|
||||
Loader2,
|
||||
TriangleAlert,
|
||||
XCircle,
|
||||
} from "lucide-react";
|
||||
|
||||
import type { BatchCaseStatus } from "@/data/batch-run";
|
||||
import { cn } from "@/lib/utils";
|
||||
@@ -15,10 +21,15 @@ const STATUS_META: Record<
|
||||
Icon: CheckCircle2,
|
||||
},
|
||||
fail: {
|
||||
label: "失败",
|
||||
label: "断言失败",
|
||||
className: "text-destructive",
|
||||
Icon: XCircle,
|
||||
},
|
||||
error: {
|
||||
label: "执行错误",
|
||||
className: "text-amber-600 dark:text-amber-400",
|
||||
Icon: TriangleAlert,
|
||||
},
|
||||
running: {
|
||||
label: "运行中",
|
||||
className: "text-primary",
|
||||
@@ -36,6 +47,10 @@ const STATUS_META: Record<
|
||||
},
|
||||
};
|
||||
|
||||
export function getBatchCaseStatusLabel(status: BatchCaseStatus): string {
|
||||
return STATUS_META[status].label;
|
||||
}
|
||||
|
||||
export function BatchCaseStatusBadge({
|
||||
status,
|
||||
className,
|
||||
|
||||
Reference in New Issue
Block a user