source: trip-planner-front/node_modules/@angular/material/fesm2015/bottom-sheet/testing.js@ 1ad8e64

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

initial commit

  • Property mode set to 100644
File size: 2.2 KB
Line 
1import { __awaiter } from 'tslib';
2import { ContentContainerComponentHarness, HarnessPredicate, TestKey } from '@angular/cdk/testing';
3
4/**
5 * @license
6 * Copyright Google LLC All Rights Reserved.
7 *
8 * Use of this source code is governed by an MIT-style license that can be
9 * found in the LICENSE file at https://angular.io/license
10 */
11/** Harness for interacting with a standard MatBottomSheet in tests. */
12class MatBottomSheetHarness extends ContentContainerComponentHarness {
13 /**
14 * Gets a `HarnessPredicate` that can be used to search for a bottom sheet with
15 * specific attributes.
16 * @param options Options for narrowing the search.
17 * @return a `HarnessPredicate` configured with the given options.
18 */
19 static with(options = {}) {
20 return new HarnessPredicate(MatBottomSheetHarness, options);
21 }
22 /** Gets the value of the bottom sheet's "aria-label" attribute. */
23 getAriaLabel() {
24 return __awaiter(this, void 0, void 0, function* () {
25 return (yield this.host()).getAttribute('aria-label');
26 });
27 }
28 /**
29 * Dismisses the bottom sheet by pressing escape. Note that this method cannot
30 * be used if "disableClose" has been set to true via the config.
31 */
32 dismiss() {
33 return __awaiter(this, void 0, void 0, function* () {
34 yield (yield this.host()).sendKeys(TestKey.ESCAPE);
35 });
36 }
37}
38// Developers can provide a custom component or template for the
39// bottom sheet. The canonical parent is the ".mat-bottom-sheet-container".
40MatBottomSheetHarness.hostSelector = '.mat-bottom-sheet-container';
41
42/**
43 * @license
44 * Copyright Google LLC All Rights Reserved.
45 *
46 * Use of this source code is governed by an MIT-style license that can be
47 * found in the LICENSE file at https://angular.io/license
48 */
49
50/**
51 * @license
52 * Copyright Google LLC All Rights Reserved.
53 *
54 * Use of this source code is governed by an MIT-style license that can be
55 * found in the LICENSE file at https://angular.io/license
56 */
57
58/**
59 * @license
60 * Copyright Google LLC All Rights Reserved.
61 *
62 * Use of this source code is governed by an MIT-style license that can be
63 * found in the LICENSE file at https://angular.io/license
64 */
65
66export { MatBottomSheetHarness };
67//# sourceMappingURL=testing.js.map
Note: See TracBrowser for help on using the repository browser.