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:
Xin Wang
2026-08-10 09:33:29 +08:00
parent ba6c7c6be3
commit 5b8b9fd097
14 changed files with 2448 additions and 1243 deletions
@@ -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,