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

Function getActualTableContent

src/cdk/table/table.spec.ts:3455–3471  ·  view source on GitHub ↗
(tableElement: Element)

Source from the content-addressed store, hash-verified

3453}
3454
3455function getActualTableContent(tableElement: Element): string[][] {
3456 let actualTableContent: Element[][] = [];
3457 getHeaderRows(tableElement).forEach(row => {
3458 actualTableContent.push(getHeaderCells(row));
3459 });
3460
3461 // Check data row cells
3462 const rows = getRows(tableElement).map(row => getCells(row));
3463 actualTableContent = actualTableContent.concat(rows);
3464
3465 getFooterRows(tableElement).forEach(row => {
3466 actualTableContent.push(getFooterCells(row));
3467 });
3468
3469 // Convert the nodes into their text content;
3470 return actualTableContent.map(row => row.map(cell => cell.textContent!.trim()));
3471}
3472
3473export function expectTableToMatchContent(tableElement: Element, expected: any[]) {
3474 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