(tableElement: Element)
| 3453 | } |
| 3454 | |
| 3455 | function getActualTableContent(tableElement: Element): string[][] { |
| 3456 | let actualTableContent: Element[][] = []; |
| 3457 | getHeaderRows(tableElement).forEach(row => { |
| 3458 | actualTableContent.push(getHeaderCells(row)); |
| 3459 | }); |
| 3460 | |
| 3461 | // Check data row cells |
| 3462 | const rows = getRows(tableElement).map(row => getCells(row)); |
| 3463 | actualTableContent = actualTableContent.concat(rows); |
| 3464 | |
| 3465 | getFooterRows(tableElement).forEach(row => { |
| 3466 | actualTableContent.push(getFooterCells(row)); |
| 3467 | }); |
| 3468 | |
| 3469 | // Convert the nodes into their text content; |
| 3470 | return actualTableContent.map(row => row.map(cell => cell.textContent!.trim())); |
| 3471 | } |
| 3472 | |
| 3473 | export function expectTableToMatchContent(tableElement: Element, expected: any[]) { |
| 3474 | const missedExpectations: string[] = []; |
no test coverage detected