(tableElement: Element)
| 1101 | } |
| 1102 | |
| 1103 | function getActualTableContent(tableElement: Element): string[][] { |
| 1104 | let actualTableContent: Element[][] = []; |
| 1105 | getHeaderRows(tableElement).forEach(row => { |
| 1106 | actualTableContent.push(getHeaderCells(row)); |
| 1107 | }); |
| 1108 | |
| 1109 | // Check data row cells |
| 1110 | const rows = getRows(tableElement).map(row => getCells(row)); |
| 1111 | actualTableContent = actualTableContent.concat(rows); |
| 1112 | |
| 1113 | getFooterRows(tableElement).forEach(row => { |
| 1114 | actualTableContent.push(getFooterCells(row)); |
| 1115 | }); |
| 1116 | |
| 1117 | // Convert the nodes into their text content; |
| 1118 | return actualTableContent.map(row => row.map(cell => cell.textContent!.trim())); |
| 1119 | } |
| 1120 | |
| 1121 | export function expectTableToMatchContent(tableElement: Element, expected: string[][]) { |
| 1122 | const missedExpectations: string[] = []; |
no test coverage detected