feat(admin): E2E content/system mock-сьюты, row testids, IFT smoke. Refs EventHub/EventHubFrontAdmin#33 #37 #38 #39
This commit is contained in:
@@ -126,15 +126,19 @@ export function DataTable<TData, TParams extends ServerTableParams>({
|
||||
</TableRow>
|
||||
))
|
||||
) : table.getRowModel().rows.length ? (
|
||||
table.getRowModel().rows.map((row) => (
|
||||
<TableRow key={row.id}>
|
||||
table.getRowModel().rows.map((row) => {
|
||||
const original = row.original as { id?: string; word?: string };
|
||||
const rowKey = original.id ?? original.word;
|
||||
return (
|
||||
<TableRow key={row.id} data-testid={rowKey ? `row-${rowKey}` : undefined}>
|
||||
{row.getVisibleCells().map((cell) => (
|
||||
<TableCell key={cell.id}>
|
||||
{flexRender(cell.column.columnDef.cell, cell.getContext())}
|
||||
</TableCell>
|
||||
))}
|
||||
</TableRow>
|
||||
))
|
||||
);
|
||||
})
|
||||
) : (
|
||||
<TableRow>
|
||||
<TableCell colSpan={columns.length} className="h-24 text-center text-muted-foreground">
|
||||
|
||||
Reference in New Issue
Block a user