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

Function getActualTableContent

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

Source from the content-addressed store, hash-verified

1095}
1096
1097function 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
1115export function expectTableToMatchContent(tableElement: Element, expected: string[][]) {
1116 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