source: trip-planner-front/node_modules/@angular/material/button/testing/button-harness.d.ts@ 59329aa

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

initial commit

  • Property mode set to 100644
File size: 1.7 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 { ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
9import { ButtonHarnessFilters } from './button-harness-filters';
10/** Harness for interacting with a standard mat-button in tests. */
11export declare class MatButtonHarness extends ContentContainerComponentHarness {
12 /** The selector for the host element of a `MatButton` instance. */
13 static hostSelector: string;
14 /**
15 * Gets a `HarnessPredicate` that can be used to search for a `MatButtonHarness` that meets
16 * certain criteria.
17 * @param options Options for filtering which button instances are considered a match.
18 * @return a `HarnessPredicate` configured with the given options.
19 */
20 static with(options?: ButtonHarnessFilters): HarnessPredicate<MatButtonHarness>;
21 /**
22 * Clicks the button at the given position relative to its top-left.
23 * @param relativeX The relative x position of the click.
24 * @param relativeY The relative y position of the click.
25 */
26 click(relativeX: number, relativeY: number): Promise<void>;
27 /** Clicks the button at its center. */
28 click(location: 'center'): Promise<void>;
29 /** Clicks the button. */
30 click(): Promise<void>;
31 /** Whether the button is disabled. */
32 isDisabled(): Promise<boolean>;
33 /** Gets the button's label text. */
34 getText(): Promise<string>;
35 /** Focuses the button. */
36 focus(): Promise<void>;
37 /** Blurs the button. */
38 blur(): Promise<void>;
39 /** Whether the button is focused. */
40 isFocused(): Promise<boolean>;
41}
Note: See TracBrowser for help on using the repository browser.