import { ComponentHarnessConstructor, ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing'; import { MatDatatableHarnessFilters, RowHarnessFilters } from './mat-datatable-harness-filters'; import { MatFooterRowHarness, MatHeaderRowHarness, MatRowHarness } from './mat-datatable-row-harness'; /** Text extracted from a mat-datatable organized by columns. */ export interface MatDatatableHarnessColumnsText { [columnName: string]: { text: string[]; headerText: string; footerText: string | undefined; }; } /** Harness for interacting with a mat-datatable in tests. */ export declare class MatDatatableHarness extends ContentContainerComponentHarness { /** The selector for the host element of a `MatDatatableHarness` instance. */ static hostSelector: string; protected _rowHarness: typeof MatRowHarness; /** * Gets a `HarnessPredicate` that can be used to search for a mat-datatable * with specific attributes. * @param options - Options for narrowing the search. * @returns a `HarnessPredicate` configured with the given options. */ static with(this: ComponentHarnessConstructor, options?: MatDatatableHarnessFilters): HarnessPredicate; /** * Gets a list of the header rows of a mat-datatable. * @returns array of the header rows of the mat-datatable (length is always 1). */ getHeaderRows(): Promise; /** * Gets all of the regular data rows in a mat-datatable. * @param filter - filter to select the sut (default; all rows). * @returns an array of all data rows matching the given filter. */ getRows(filter?: RowHarnessFilters): Promise; /** * Gets a list of the footer rows in a mat-datatable. * @returns array of the footer rows of the mat-datatable (or an empty array, if no footer is defined). */ getFooterRows(): Promise; /** * Gets the text inside the entire mat-datatable data rows organized by rows. * @returns an array of arrays of the content of all data rows. */ getCellTextByIndex(): Promise; /** * Gets the text inside the entire mat-datatable organized by columns. * @returns an object with all columns with headerText and array of data values. */ getCellTextByColumnName(): Promise; }