Last change
on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
3.3 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 | */
|
---|
8 | import { __awaiter } from "tslib";
|
---|
9 | import { HarnessPredicate, ComponentHarness } from '@angular/cdk/testing';
|
---|
10 | /** Harness for interacting with a standard Material chip remove button in tests. */
|
---|
11 | export class MatChipRemoveHarness extends ComponentHarness {
|
---|
12 | /**
|
---|
13 | * Gets a `HarnessPredicate` that can be used to search for a `MatChipRemoveHarness` that meets
|
---|
14 | * certain criteria.
|
---|
15 | * @param options Options for filtering which input instances are considered a match.
|
---|
16 | * @return a `HarnessPredicate` configured with the given options.
|
---|
17 | */
|
---|
18 | static with(options = {}) {
|
---|
19 | return new HarnessPredicate(MatChipRemoveHarness, options);
|
---|
20 | }
|
---|
21 | /** Clicks the remove button. */
|
---|
22 | click() {
|
---|
23 | return __awaiter(this, void 0, void 0, function* () {
|
---|
24 | return (yield this.host()).click();
|
---|
25 | });
|
---|
26 | }
|
---|
27 | }
|
---|
28 | MatChipRemoveHarness.hostSelector = '.mat-chip-remove';
|
---|
29 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hpcC1yZW1vdmUtaGFybmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYXRlcmlhbC9jaGlwcy90ZXN0aW5nL2NoaXAtcmVtb3ZlLWhhcm5lc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HOztBQUVILE9BQU8sRUFBQyxnQkFBZ0IsRUFBRSxnQkFBZ0IsRUFBQy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