Skip to content

Commit 92fcae5

Browse files
authored
Fix comparison table test (#4481)
1 parent 344e577 commit 92fcae5

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

webview/src/plots/components/comparisonTable/ComparisonTable.test.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,20 @@ describe('ComparisonTable', () => {
258258
] as Revision[]
259259

260260
renderTable(
261-
{ ...comparisonTableFixture, revisions: newRevisions },
261+
{
262+
...comparisonTableFixture,
263+
plots: comparisonTableFixture.plots.map(plot => ({
264+
...plot,
265+
revisions: {
266+
...plot.revisions,
267+
[newRevName]: {
268+
id: newRevName,
269+
imgs: [{ errors: undefined, loading: false, url: undefined }]
270+
}
271+
}
272+
})),
273+
revisions: newRevisions
274+
},
262275
rerender
263276
)
264277
const headers = getHeaders().map(header => header.textContent)

webview/src/plots/components/comparisonTable/ComparisonTableRows.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ export const ComparisionTableRows: React.FC<ComparisonTableRowsProps> = ({
5454
path={path}
5555
plots={columns.map(column => ({
5656
id: column.id,
57-
imgs: revs[column.id]?.imgs || [
58-
{ errors: undefined, loading: false, url: undefined }
59-
]
57+
imgs: revs[column.id]?.imgs
6058
}))}
6159
nbColumns={columns.length}
6260
pinnedColumn={pinnedColumn}

0 commit comments

Comments
 (0)