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

Function getActualTableContent

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

Source from the content-addressed store, hash-verified

3519}
3520
3521function getActualTableContent(tableElement: Element): string[][] {
3522 let actualTableContent: Element[][] = [];
3523 getHeaderRows(tableElement).forEach(row => {
3524 actualTableContent.push(getHeaderCells(row));
3525 });
3526
3527 // Check data row cells
3528 const rows = getRows(tableElement).map(row => getCells(row));
3529 actualTableContent = actualTableContent.concat(rows);
3530
3531 getFooterRows(tableElement).forEach(row => {
3532 actualTableContent.push(getFooterCells(row));
3533 });
3534
3535 // Convert the nodes into their text content;
3536 return actualTableContent.map(row => row.map(cell => cell.textContent!.trim()));
3537}
3538
3539export function expectTableToMatchContent(tableElement: Element, expected: any[]) {
3540 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