/** * @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 { ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing'; import { MatDrawerContentHarness } from './drawer-content-harness'; import { MatDrawerHarness } from './drawer-harness'; /** Harness for interacting with a standard mat-drawer-container in tests. */ export class MatDrawerContainerHarness extends ContentContainerComponentHarness { /** The selector for the host element of a `MatDrawerContainer` instance. */ static { this.hostSelector = '.mat-drawer-container'; } /** * Gets a `HarnessPredicate` that can be used to search for a `MatDrawerContainerHarness` that * meets certain criteria. * @param options Options for filtering which container instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with(options = {}) { return new HarnessPredicate(MatDrawerContainerHarness, options); } /** * Gets drawers that match particular criteria within the container. * @param filter Optionally filters which chips are included. */ async getDrawers(filter = {}) { return this.locatorForAll(MatDrawerHarness.with(filter))(); } /** Gets the element that has the container's content. */ async getContent() { return this.locatorFor(MatDrawerContentHarness)(); } } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJhd2VyLWNvbnRhaW5lci1oYXJuZXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21hdGVyaWFsL3NpZGVuYXYvdGVzdGluZy9kcmF3ZXItY29udGFpbmVyLWhhcm5lc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUFDLGdDQUFnQyxFQUFFLGdCQUFnQixFQUFDLE1BQU0sc0JBQXNCLENBQUM7QUFFeEYsT0FBTyxFQUFDLHVCQUF1QixFQUFDLE1BQU0sMEJBQTBCLENBQUM7QUFDakUsT0FBTyxFQUFDLGdCQUFnQixFQUFDLE1BQU0sa0JBQWtCLENBQUM7QUFFbEQsNkVBQTZFO0FBQzdFLE1BQU0sT0FBTyx5QkFBMEIsU0F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