1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | import { ComponentHarness, ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';
|
---|
9 | import { RowHarnessFilters, CellHarnessFilters } from './table-harness-filters';
|
---|
10 | import { MatCellHarness, MatHeaderCellHarness, MatFooterCellHarness } from './cell-harness';
|
---|
11 | /** Text extracted from a table row organized by columns. */
|
---|
12 | export interface MatRowHarnessColumnsText {
|
---|
13 | [columnName: string]: string;
|
---|
14 | }
|
---|
15 | export declare abstract class _MatRowHarnessBase<CellType extends (ComponentHarnessConstructor<Cell> & {
|
---|
16 | with: (options?: CellHarnessFilters) => HarnessPredicate<Cell>;
|
---|
17 | }), Cell extends ComponentHarness & {
|
---|
18 | getText(): Promise<string>;
|
---|
19 | getColumnName(): Promise<string>;
|
---|
20 | }> extends ComponentHarness {
|
---|
21 | protected abstract _cellHarness: CellType;
|
---|
22 | /** Gets a list of `MatCellHarness` for all cells in the row. */
|
---|
23 | getCells(filter?: CellHarnessFilters): Promise<Cell[]>;
|
---|
24 | /** Gets the text of the cells in the row. */
|
---|
25 | getCellTextByIndex(filter?: CellHarnessFilters): Promise<string[]>;
|
---|
26 | /** Gets the text inside the row organized by columns. */
|
---|
27 | getCellTextByColumnName(): Promise<MatRowHarnessColumnsText>;
|
---|
28 | }
|
---|
29 | /** Harness for interacting with a standard Angular Material table row. */
|
---|
30 | export declare class MatRowHarness extends _MatRowHarnessBase<typeof MatCellHarness, MatCellHarness> {
|
---|
31 | /** The selector for the host element of a `MatRowHarness` instance. */
|
---|
32 | static hostSelector: string;
|
---|
33 | protected _cellHarness: typeof MatCellHarness;
|
---|
34 | /**
|
---|
35 | * Gets a `HarnessPredicate` that can be used to search for a table row with specific attributes.
|
---|
36 | * @param options Options for narrowing the search
|
---|
37 | * @return a `HarnessPredicate` configured with the given options.
|
---|
38 | */
|
---|
39 | static with(options?: RowHarnessFilters): HarnessPredicate<MatRowHarness>;
|
---|
40 | }
|
---|
41 | /** Harness for interacting with a standard Angular Material table header row. */
|
---|
42 | export declare class MatHeaderRowHarness extends _MatRowHarnessBase<typeof MatHeaderCellHarness, MatHeaderCellHarness> {
|
---|
43 | /** The selector for the host element of a `MatHeaderRowHarness` instance. */
|
---|
44 | static hostSelector: string;
|
---|
45 | protected _cellHarness: typeof MatHeaderCellHarness;
|
---|
46 | /**
|
---|
47 | * Gets a `HarnessPredicate` that can be used to search for
|
---|
48 | * a table header row with specific attributes.
|
---|
49 | * @param options Options for narrowing the search
|
---|
50 | * @return a `HarnessPredicate` configured with the given options.
|
---|
51 | */
|
---|
52 | static with(options?: RowHarnessFilters): HarnessPredicate<MatHeaderRowHarness>;
|
---|
53 | }
|
---|
54 | /** Harness for interacting with a standard Angular Material table footer row. */
|
---|
55 | export declare class MatFooterRowHarness extends _MatRowHarnessBase<typeof MatFooterCellHarness, MatFooterCellHarness> {
|
---|
56 | /** The selector for the host element of a `MatFooterRowHarness` instance. */
|
---|
57 | static hostSelector: string;
|
---|
58 | protected _cellHarness: typeof MatFooterCellHarness;
|
---|
59 | /**
|
---|
60 | * Gets a `HarnessPredicate` that can be used to search for
|
---|
61 | * a table footer row cell with specific attributes.
|
---|
62 | * @param options Options for narrowing the search
|
---|
63 | * @return a `HarnessPredicate` configured with the given options.
|
---|
64 | */
|
---|
65 | static with(options?: RowHarnessFilters): HarnessPredicate<MatFooterRowHarness>;
|
---|
66 | }
|
---|