(tableElement: Element)
| 3519 | } |
| 3520 | |
| 3521 | function getActualTableContent(tableElement: Element): string[][] { |
| 3522 | let actualTableContent: Element[][] = []; |
| 3523 | getHeaderRows(tableElement).forEach(row => { |
| 3524 | actualTableContent.push(getHeaderCells(row)); |
| 3525 | }); |
| 3526 | |
| 3527 | // Check data row cells |
| 3528 | const rows = getRows(tableElement).map(row => getCells(row)); |
| 3529 | actualTableContent = actualTableContent.concat(rows); |
| 3530 | |
| 3531 | getFooterRows(tableElement).forEach(row => { |
| 3532 | actualTableContent.push(getFooterCells(row)); |
| 3533 | }); |
| 3534 | |
| 3535 | // Convert the nodes into their text content; |
| 3536 | return actualTableContent.map(row => row.map(cell => cell.textContent!.trim())); |
| 3537 | } |
| 3538 | |
| 3539 | export function expectTableToMatchContent(tableElement: Element, expected: any[]) { |
| 3540 | const missedExpectations: string[] = []; |
no test coverage detected