diff --git a/frontend/app/projects/[projectId]/runs/[runId]/RunEditor.tsx b/frontend/app/projects/[projectId]/runs/[runId]/RunEditor.tsx index 170d1ac..95f9291 100644 --- a/frontend/app/projects/[projectId]/runs/[runId]/RunEditor.tsx +++ b/frontend/app/projects/[projectId]/runs/[runId]/RunEditor.tsx @@ -263,7 +263,6 @@ export default function RunEditor({ projectId, runId }: Props) {
>; }; export default function TestCaseSelector({ - projectId, cases, selectedKeys, onSelectionChange, @@ -56,27 +52,21 @@ export default function TestCaseSelector({ return sortDescriptor.direction === "descending" ? -cmp : cmp; }); }, [sortDescriptor, cases]); + + const notIncludedCaseClass = "text-neutral-200 dark:text-neutral-600"; + const chipBaseClass = "border-none gap-1 text-default-600"; + const renderCell = useCallback((testCase: CaseType, columnKey: Key) => { const cellValue = testCase[columnKey as keyof CaseType]; - // console.log(columnKey, cellValue) + const isIncluded = testCase.isIncluded; switch (columnKey) { - case "id": - return {cellValue}; - case "title": - return ( - - {cellValue} - - ); case "priority": return ( ); - case "isIncluded": - const flag = cellValue ? "true" : "false" - return {flag}; case "runStatus": return ( - - {testRunCaseStatus[cellValue].name} - + + + + + + {testRunCaseStatus.map((runCaseStatus, index) => ( + {}}> + {testRunCaseStatus[index].name} + + ))} + + ); case "actions": return ( @@ -167,7 +165,10 @@ export default function TestCaseSelector({ {(item) => ( - + {(columnKey) => ( {renderCell(item, columnKey)} )} diff --git a/frontend/config/selection.ts b/frontend/config/selection.ts index c72c9f6..872506e 100644 --- a/frontend/config/selection.ts +++ b/frontend/config/selection.ts @@ -43,7 +43,6 @@ const testRunStatus = [ ] const testRunCaseStatus = [ - { name: "Not included", uid: "notincluded", color: "primary" }, { name: "Untested", uid: "untested", color: "primary" }, { name: "Passed", uid: "passed", color: "success" }, { name: "Failed", uid: "untested", color: "danger" },