From e38b3f7ff581e7a23909a076309b85d54e1d24f1 Mon Sep 17 00:00:00 2001 From: Andrew Cherniavskyi Date: Thu, 26 Dec 2024 22:36:39 +0100 Subject: [PATCH] fix: add missing test helper --- test/utils/helperFn.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/utils/helperFn.ts b/test/utils/helperFn.ts index 068d37943e5d..ac727a8e00f4 100644 --- a/test/utils/helperFn.ts +++ b/test/utils/helperFn.ts @@ -125,6 +125,12 @@ export function getColumnValues(colIndex: number) { ).map((node) => node!.textContent); } +export function getRowValues(rowIndex: number) { + return Array.from( + document.querySelectorAll(`[data-rowindex="${rowIndex}"] [role="gridcell"]`), + ).map((node) => node!.textContent); +} + export function getColumnHeaderCell(colIndex: number, rowIndex?: number): HTMLElement { const headerRowSelector = rowIndex === undefined ? '' : `[role="row"][aria-rowindex="${rowIndex + 1}"] `;