[6a3a178] | 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 { ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
---|
| 9 | import { DialogRole } from '@angular/material/dialog';
|
---|
| 10 | import { DialogHarnessFilters } from './dialog-harness-filters';
|
---|
| 11 | /** Harness for interacting with a standard `MatDialog` in tests. */
|
---|
| 12 | export declare class MatDialogHarness extends ContentContainerComponentHarness<string> {
|
---|
| 13 | /** The selector for the host element of a `MatDialog` instance. */
|
---|
| 14 | static hostSelector: string;
|
---|
| 15 | /**
|
---|
| 16 | * Gets a `HarnessPredicate` that can be used to search for a `MatDialogHarness` that meets
|
---|
| 17 | * certain criteria.
|
---|
| 18 | * @param options Options for filtering which dialog instances are considered a match.
|
---|
| 19 | * @return a `HarnessPredicate` configured with the given options.
|
---|
| 20 | */
|
---|
| 21 | static with(options?: DialogHarnessFilters): HarnessPredicate<MatDialogHarness>;
|
---|
| 22 | /** Gets the id of the dialog. */
|
---|
| 23 | getId(): Promise<string | null>;
|
---|
| 24 | /** Gets the role of the dialog. */
|
---|
| 25 | getRole(): Promise<DialogRole | null>;
|
---|
| 26 | /** Gets the value of the dialog's "aria-label" attribute. */
|
---|
| 27 | getAriaLabel(): Promise<string | null>;
|
---|
| 28 | /** Gets the value of the dialog's "aria-labelledby" attribute. */
|
---|
| 29 | getAriaLabelledby(): Promise<string | null>;
|
---|
| 30 | /** Gets the value of the dialog's "aria-describedby" attribute. */
|
---|
| 31 | getAriaDescribedby(): Promise<string | null>;
|
---|
| 32 | /**
|
---|
| 33 | * Closes the dialog by pressing escape.
|
---|
| 34 | *
|
---|
| 35 | * Note: this method does nothing if `disableClose` has been set to `true` for the dialog.
|
---|
| 36 | */
|
---|
| 37 | close(): Promise<void>;
|
---|
| 38 | }
|
---|