Skip to content

Commit

Permalink
FIX: broken test util (#454)
Browse files Browse the repository at this point in the history
  • Loading branch information
matttdawson authored May 15, 2024
1 parent c4117bf commit 9fc844f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/utils/testUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,26 @@ export const findRow = async (rowId: number | string, within?: HTMLElement): Pro
{ tagName: `.ag-center-cols-container div[row-id='${rowId}']:not(:empty)` },
within,
);
let combineChildren = Array.from(row.children);
// @ts-ignore
let combineChildren = [...row.children];

const leftCols = queryQuick<HTMLDivElement>(
{ tagName: `.ag-pinned-left-cols-container div[row-id='${rowId}']` },
within,
);
if (leftCols) combineChildren = [...Array.from(row.children), ...combineChildren];
if (leftCols) {
// @ts-ignore
combineChildren = [...leftCols.children, ...combineChildren];
}

const rightCols = queryQuick<HTMLDivElement>(
{ tagName: `.ag-pinned-right-cols-container div[row-id='${rowId}']` },
within,
);
if (rightCols) combineChildren = [...Array.from(row.children), ...combineChildren];
if (rightCols) {
// @ts-ignore
combineChildren = [...rightCols.children, ...combineChildren];
}

row.replaceChildren(...combineChildren);
});
Expand Down

0 comments on commit 9fc844f

Please sign in to comment.