From 9fc844ffc1bab85f2bcffeeee72b75bd718c6dcf Mon Sep 17 00:00:00 2001 From: matttdawson <89495499+matttdawson@users.noreply.github.com> Date: Thu, 16 May 2024 10:01:52 +1200 Subject: [PATCH] FIX: broken test util (#454) --- src/utils/testUtil.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/utils/testUtil.ts b/src/utils/testUtil.ts index 0b1d9e39..98e59bc4 100644 --- a/src/utils/testUtil.ts +++ b/src/utils/testUtil.ts @@ -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( { 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( { 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); });