Skip to content

Commit

Permalink
fix: add missing test helper
Browse files Browse the repository at this point in the history
  • Loading branch information
cherniavskii committed Dec 26, 2024
1 parent 329d35a commit e38b3f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/utils/helperFn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}"] `;
Expand Down

0 comments on commit e38b3f7

Please sign in to comment.