import { ComponentHarness, ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing'; import { _MatCellHarnessBase, MatFooterCellHarness, MatHeaderCellHarness, MatRowCellHarness } from './mat-datatable-cell-harness'; import { CellHarnessFilters, HeaderCellHarnessFilters, RowCellHarnessFilters, RowHarnessFilters } from './mat-datatable-harness-filters'; /** Object for the content of a table row as text organized by columns. */ export interface MatRowHarnessColumnsText { [columnName: string]: string; } export declare abstract class _MatRowHarnessBase & { with: (options?: CellHarnessFilters) => HarnessPredicate; }, Cell extends _MatCellHarnessBase, CellFilterType extends RowCellHarnessFilters> extends ComponentHarness { protected abstract _cellHarness: CellType; /** * Checks if the values of the table row columns given in the 'value' parameter, * match the given column values. Only columns defined in the pattern are inspected. * @param value The nullable object defining all columns of a row and their values used for the checks. * Alternatively a Promise resolving to the nullable object. * @param pattern Object defining the columns and the values or RegExp expected to match. * If `pattern` is `null`, the value is expected to be `null`. * @returns Whether the value matches the pattern. */ static rowCellsContentMatch(value: MatRowHarnessColumnsText | Promise | null, pattern: Record | null): Promise; /** * Gets a list of `MatRowCellHarness`, 'MatHeaderCellHarness' or 'MatFooterCellHarness' for all cells in the row. * @param filter - filter to select the sut (default; all cells). * @returns an array of the selected cells. */ getCells(filter?: CellFilterType): Promise; /** * Gets the text of the cells in the row. * @param filter - filter to select the returned cells (default; all cells). * @returns an array of the content of the selected cells. */ getCellTextByIndex(filter?: CellFilterType): Promise; /** * Gets the text inside the row as object organized by column names. * @param filter - filter to select the sut (default; all cells). * @returns an object for the selected cells with the columns as properties. */ getCellTextByColumnName(filter?: CellFilterType): Promise; } /** Harness for interacting with a mat-datatable row. */ export declare class MatRowHarness extends _MatRowHarnessBase { /** The selector for the host element of a `MatRowHarness` instance. */ static hostSelector: string; protected _cellHarness: typeof MatRowCellHarness; /** * Gets a `HarnessPredicate` that can be used to search for a table row with specific attributes. * @param options - Options for narrowing the search * @returns a `HarnessPredicate` configured with the given options. */ static with(this: ComponentHarnessConstructor, options?: RowHarnessFilters): HarnessPredicate; /** * Clicks the row. * @returns promise that completes after clicking the row */ click(): Promise; } /** Harness for interacting with a mat-datatable header row. */ export declare class MatHeaderRowHarness extends _MatRowHarnessBase { /** The selector for the host element of a `MatHeaderRowHarness` instance. */ static hostSelector: string; protected _cellHarness: typeof MatHeaderCellHarness; /** * Gets a list of `MatHeaderCellHarness` for all cells in the header row. * @param filter - filter to select the sut (default; all cells). * @returns an array of the selected cells. */ getCells(filter?: HeaderCellHarnessFilters): Promise; } /** Harness for interacting with an Angular Material table footer row. */ export declare class MatFooterRowHarness extends _MatRowHarnessBase { /** The selector for the host element of a `MatFooterRowHarness` instance. */ static hostSelector: string; protected _cellHarness: typeof MatFooterCellHarness; /** * Gets a `HarnessPredicate` that can be used to search for a table footer row cell with specific * attributes. * @param options Options for narrowing the search * @returns a `HarnessPredicate` configured with the given options. */ static with(this: ComponentHarnessConstructor, options?: RowHarnessFilters): HarnessPredicate; }