({page, size, action})
| 229 | ]); |
| 230 | |
| 231 | async function verifyTableRows({page, size, action}) { |
| 232 | let expected = (action.expected ?? records)(size); |
| 233 | let rows = await page.locator('.data-table [data-record]').evaluateAll(rows => |
| 234 | rows.map(row => ({ |
| 235 | id: row.getAttribute('data-record'), |
| 236 | name: row.querySelector('[role="rowheader"]')?.textContent |
| 237 | })) |
| 238 | ); |
| 239 | if ( |
| 240 | rows.length !== expected.length || |
| 241 | rows.some((row, i) => row.id !== expected[i] || row.name !== recordLabel(expected[i])) |
| 242 | ) { |
| 243 | throw new Error('The table did not retain the expected row order and content.'); |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | const filtered = size => records(size).filter(id => id.includes('9')); |
| 248 | const dataRows = (expected, direction) => [ |
nothing calls this directly
no test coverage detected