(columns: readonly Column<unknown>[])
| 30 | const rows: readonly unknown[] = []; |
| 31 | |
| 32 | async function run(columns: readonly Column<unknown>[]) { |
| 33 | let unmount; |
| 34 | if (groupBy === undefined) { |
| 35 | ({ unmount } = await page.render(<DataGrid columns={columns} rows={rows} />)); |
| 36 | } else { |
| 37 | ({ unmount } = await page.render( |
| 38 | <TreeDataGrid |
| 39 | columns={columns} |
| 40 | rows={rows} |
| 41 | groupBy={groupBy} |
| 42 | rowGrouper={() => ({})} |
| 43 | expandedGroupIds={new Set()} |
| 44 | onExpandedGroupIdsChange={() => {}} |
| 45 | /> |
| 46 | )); |
| 47 | } |
| 48 | |
| 49 | const headerCells = page.getByRole('columnheader'); |
| 50 | await testCount(headerCells, expected.length); |
| 51 | expect(headerCells.elements().map((c) => c.textContent)).toStrictEqual(expected); |
| 52 | await unmount(); |
| 53 | } |
| 54 | |
| 55 | let expected: readonly string[] = ['', 'frz1', 'frz2', 'std1', 'std2']; |
| 56 | let groupBy: readonly string[] | undefined; |
no test coverage detected