Skip to content

Commit

Permalink
fix: use the right key
Browse files Browse the repository at this point in the history
  • Loading branch information
loadez committed Sep 13, 2024
1 parent 85b3260 commit 49eb554
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
14 changes: 9 additions & 5 deletions dashboard/src/components/Accordion/Accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ import { GroupedTestStatus } from '@/components/Status/Status';

import HeaderWithInfo from '@/pages/TreeDetails/Tabs/HeaderWithInfo';

import { TableBody, TableCell, TableRow } from '../ui/table';
import BaseTable from '../Table/BaseTable';
import { TableBody, TableCell, TableRow } from '@/components/ui/table';

import BaseTable from '@/components/Table/BaseTable';

import {
Collapsible,
CollapsibleContent,
CollapsibleTrigger,
} from '../ui/collapsible';
} from '@/components/ui/collapsible';

import AccordionBuildContent from './BuildAccordionContent';

Expand Down Expand Up @@ -233,7 +235,7 @@ const AccordionTestsContent = ({
<TableRow
className="cursor-pointer hover:bg-lightBlue"
onClick={onClickName}
key={test.path}
key={test.id}
>
<TableCell>{test.path}</TableCell>
<TableCell>{test.status}</TableCell>
Expand All @@ -248,7 +250,9 @@ const AccordionTestsContent = ({

return (
<div className="h-max-12 overflow-scroll">
<BaseTable headers={headerTestsDetails}>{rows}</BaseTable>
<BaseTable headers={headerTestsDetails}>
<TableBody>{rows}</TableBody>
</BaseTable>
</div>
);
};
Expand Down
1 change: 1 addition & 0 deletions dashboard/src/components/Table/TestsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const TestsTable = ({ testHistory }: ITestsTable): JSX.Element => {
}
groups[group].total_tests++;
groups[group].individual_tests.push({
id: e.id,
duration: e.duration?.toString() ?? '',
path: e.path,
start_time: e.startTime,
Expand Down
1 change: 1 addition & 0 deletions dashboard/src/types/general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type TPathTests = {
};

export type TIndividualTest = {
id: string;
path: string;
status: Status;
start_time: string;
Expand Down

0 comments on commit 49eb554

Please sign in to comment.