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