MCPcopy Create free account
hub / github.com/angular/components / getActualTableContent

Function getActualTableContent

src/material/table/table.spec.ts:1103–1119  ·  view source on GitHub ↗
(tableElement: Element)

Source from the content-addressed store, hash-verified

1101}
1102
1103function 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
1121export function expectTableToMatchContent(tableElement: Element, expected: string[][]) {
1122 const missedExpectations: string[] = [];

Callers 1

Calls 7

getHeaderRowsFunction · 0.70
getHeaderCellsFunction · 0.70
getRowsFunction · 0.70
getCellsFunction · 0.70
getFooterRowsFunction · 0.70
getFooterCellsFunction · 0.70
pushMethod · 0.65

Tested by

no test coverage detected