/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { ComponentHarness, HarnessPredicate, } from '@angular/cdk/testing'; import { MatChipHarness } from './chip-harness'; /** Harness for interacting with a mat-chip-set in tests. */ export class MatChipSetHarness extends ComponentHarness { static { this.hostSelector = '.mat-mdc-chip-set'; } /** * Gets a `HarnessPredicate` that can be used to search for a chip set with specific attributes. * @param options Options for filtering which chip set instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with(options = {}) { return new HarnessPredicate(this, options); } /** Gets promise of the harnesses for the chips. */ async getChips(filter = {}) { return await this.locatorForAll(MatChipHarness.with(filter))(); } } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hpcC1zZXQtaGFybmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYXRlcmlhbC9jaGlwcy90ZXN0aW5nL2NoaXAtc2V0LWhhcm5lc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUVMLGdCQUFnQixFQUNoQixnQkFBZ0IsR0FDakIsTUFBTSxzQkFBc0IsQ0FBQztBQUM5QixPQUFPLEVBQUMsY0FBYyxFQUFDLE1BQU0sZ0JBQWdCLENBQUM7QUFHOUMsNERBQTREO0FBQzVELE1BQU0sT0FBTyxpQkFBa0IsU0FBUSxnQkFBZ0I7YUFDOUMsaUJBQVksR0FBRyxtQkFBbUIsQ0FBQztJQUUxQzs7OztPQUlHO0lBQ0gsTUFBTSxDQUFDLElBQUksQ0FFVCxVQUFpQyxFQUFFO1FBRW5DLE9BQU8sSUFBSSxnQkFBZ0IsQ0FBQyxJQUFJLEVBQUUsT0FBTyxDQUFDLENBQUM7SUFDN0MsQ0FBQztJQUVELG1EQUFtRDtJQUNuRCxLQUFLLENB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