source: trip-planner-front/node_modules/@angular/material/table/testing/row-harness.d.ts@ 188ee53

Last change on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 3.4 KB
Line 
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 */
8import { ComponentHarness, ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';
9import { RowHarnessFilters, CellHarnessFilters } from './table-harness-filters';
10import { MatCellHarness, MatHeaderCellHarness, MatFooterCellHarness } from './cell-harness';
11/** Text extracted from a table row organized by columns. */
12export interface MatRowHarnessColumnsText {
13 [columnName: string]: string;
14}
15export 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. */
30export 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. */
42export 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. */
55export 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}
Note: See TracBrowser for help on using the repository browser.