source: trip-planner-front/node_modules/@angular/material/fesm2015/progress-spinner/testing.js@ 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: 2.3 KB
Line 
1import { __awaiter } from 'tslib';
2import { coerceNumberProperty } from '@angular/cdk/coercion';
3import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
4
5/**
6 * @license
7 * Copyright Google LLC All Rights Reserved.
8 *
9 * Use of this source code is governed by an MIT-style license that can be
10 * found in the LICENSE file at https://angular.io/license
11 */
12/** Harness for interacting with a standard mat-progress-spinner in tests. */
13class MatProgressSpinnerHarness extends ComponentHarness {
14 /**
15 * Gets a `HarnessPredicate` that can be used to search for a `MatProgressSpinnerHarness` that
16 * meets certain criteria.
17 * @param options Options for filtering which progress spinner instances are considered a match.
18 * @return a `HarnessPredicate` configured with the given options.
19 */
20 static with(options = {}) {
21 return new HarnessPredicate(MatProgressSpinnerHarness, options);
22 }
23 /** Gets the progress spinner's value. */
24 getValue() {
25 return __awaiter(this, void 0, void 0, function* () {
26 const host = yield this.host();
27 const ariaValue = yield host.getAttribute('aria-valuenow');
28 return ariaValue ? coerceNumberProperty(ariaValue) : null;
29 });
30 }
31 /** Gets the progress spinner's mode. */
32 getMode() {
33 return __awaiter(this, void 0, void 0, function* () {
34 const modeAttr = (yield this.host()).getAttribute('mode');
35 return yield modeAttr;
36 });
37 }
38}
39/** The selector for the host element of a `MatProgressSpinner` instance. */
40MatProgressSpinnerHarness.hostSelector = '.mat-progress-spinner';
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 { MatProgressSpinnerHarness };
67//# sourceMappingURL=testing.js.map
Note: See TracBrowser for help on using the repository browser.