source: trip-planner-front/node_modules/@angular/material/snack-bar/testing/snack-bar-harness.d.ts@ 6a3a178

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

initial commit

  • Property mode set to 100644
File size: 3.0 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 { AriaLivePoliteness } from '@angular/cdk/a11y';
9import { ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
10import { SnackBarHarnessFilters } from './snack-bar-harness-filters';
11/** Harness for interacting with a standard mat-snack-bar in tests. */
12export declare class MatSnackBarHarness extends ContentContainerComponentHarness<string> {
13 /** The selector for the host element of a `MatSnackBar` instance. */
14 static hostSelector: string;
15 protected _messageSelector: string;
16 protected _actionButtonSelector: string;
17 private _snackBarLiveRegion;
18 /**
19 * Gets a `HarnessPredicate` that can be used to search for a `MatSnackBarHarness` that meets
20 * certain criteria.
21 * @param options Options for filtering which snack bar instances are considered a match.
22 * @return a `HarnessPredicate` configured with the given options.
23 */
24 static with(options?: SnackBarHarnessFilters): HarnessPredicate<MatSnackBarHarness>;
25 /**
26 * Gets the role of the snack-bar. The role of a snack-bar is determined based
27 * on the ARIA politeness specified in the snack-bar config.
28 * @deprecated Use `getAriaLive` instead.
29 * @breaking-change 13.0.0
30 */
31 getRole(): Promise<'alert' | 'status' | null>;
32 /**
33 * Gets the aria-live of the snack-bar's live region. The aria-live of a snack-bar is
34 * determined based on the ARIA politeness specified in the snack-bar config.
35 */
36 getAriaLive(): Promise<AriaLivePoliteness>;
37 /**
38 * Whether the snack-bar has an action. Method cannot be used for snack-bar's with custom content.
39 */
40 hasAction(): Promise<boolean>;
41 /**
42 * Gets the description of the snack-bar. Method cannot be used for snack-bar's without action or
43 * with custom content.
44 */
45 getActionDescription(): Promise<string>;
46 /**
47 * Dismisses the snack-bar by clicking the action button. Method cannot be used for snack-bar's
48 * without action or with custom content.
49 */
50 dismissWithAction(): Promise<void>;
51 /**
52 * Gets the message of the snack-bar. Method cannot be used for snack-bar's with custom content.
53 */
54 getMessage(): Promise<string>;
55 /** Gets whether the snack-bar has been dismissed. */
56 isDismissed(): Promise<boolean>;
57 /**
58 * Asserts that the current snack-bar has annotated content. Promise reject
59 * if content is not annotated.
60 */
61 protected _assertContentAnnotated(): Promise<void>;
62 /**
63 * Asserts that the current snack-bar has an action defined. Otherwise the
64 * promise will reject.
65 */
66 protected _assertHasAction(): Promise<void>;
67 /** Whether the snack-bar is using the default content template. */
68 private _isSimpleSnackBar;
69 /** Gets the simple snack bar action button. */
70 private _getActionButton;
71}
Note: See TracBrowser for help on using the repository browser.