/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { ComponentHarness, ComponentHarnessConstructor, ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing'; import { TableHarnessFilters, RowHarnessFilters } from './table-harness-filters'; import { MatRowHarness, MatHeaderRowHarness, MatFooterRowHarness, MatRowHarnessColumnsText } from './row-harness'; /** Text extracted from a table organized by columns. */ export interface MatTableHarnessColumnsText { [columnName: string]: { text: string[]; headerText: string[]; footerText: string[]; }; } interface RowBase extends ComponentHarness { getCellTextByColumnName(): Promise; getCellTextByIndex(): Promise; } export declare abstract class _MatTableHarnessBase & { with: (options?: RowHarnessFilters) => HarnessPredicate; }), HeaderRow extends RowBase, RowType extends (ComponentHarnessConstructor & { with: (options?: RowHarnessFilters) => HarnessPredicate; }), Row extends RowBase, FooterRowType extends (ComponentHarnessConstructor & { with: (options?: RowHarnessFilters) => HarnessPredicate; }), FooterRow extends RowBase> extends ContentContainerComponentHarness { protected abstract _headerRowHarness: HeaderRowType; protected abstract _rowHarness: RowType; protected abstract _footerRowHarness: FooterRowType; /** Gets all of the header rows in a table. */ getHeaderRows(filter?: RowHarnessFilters): Promise; /** Gets all of the regular data rows in a table. */ getRows(filter?: RowHarnessFilters): Promise; /** Gets all of the footer rows in a table. */ getFooterRows(filter?: RowHarnessFilters): Promise; /** Gets the text inside the entire table organized by rows. */ getCellTextByIndex(): Promise; /** Gets the text inside the entire table organized by columns. */ getCellTextByColumnName(): Promise; } /** Harness for interacting with a standard mat-table in tests. */ export declare class MatTableHarness extends _MatTableHarnessBase { /** The selector for the host element of a `MatTableHarness` instance. */ static hostSelector: string; protected _headerRowHarness: typeof MatHeaderRowHarness; protected _rowHarness: typeof MatRowHarness; protected _footerRowHarness: typeof MatFooterRowHarness; /** * Gets a `HarnessPredicate` that can be used to search for a table with specific attributes. * @param options Options for narrowing the search * @return a `HarnessPredicate` configured with the given options. */ static with(options?: TableHarnessFilters): HarnessPredicate; } export {};