/** * @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 { MatSidenavContentHarness } from './sidenav-content-harness'; import { MatSidenavHarness } from './sidenav-harness'; /** Harness for interacting with a standard mat-sidenav-container in tests. */ export class MatSidenavContainerHarness extends ContentContainerComponentHarness { /** The selector for the host element of a `MatSidenavContainer` instance. */ static { this.hostSelector = '.mat-sidenav-container'; } /** * Gets a `HarnessPredicate` that can be used to search for a `MatSidenavContainerHarness` 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(MatSidenavContainerHarness, options); } /** * Gets sidenavs that match particular criteria within the container. * @param filter Optionally filters which chips are included. */ async getSidenavs(filter = {}) { return this.locatorForAll(MatSidenavHarness.with(filter))(); } /** Gets the element that has the container's content. */ async getContent() { return this.locatorFor(MatSidenavContentHarness)(); } } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2lkZW5hdi1jb250YWluZXItaGFybmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYXRlcmlhbC9zaWRlbmF2L3Rlc3Rpbmcvc2lkZW5hdi1jb250YWluZXItaGFybmVzcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSCxPQUFPLEVBQUMsZ0NBQWdDLEVBQUUsZ0JBQWdCLEVBQUMsTUFBTSxzQkFBc0IsQ0FBQztBQUV4RixPQUFPLEVBQUMsd0JBQXdCLEVBQUMsTUFBTSwyQkFBMkIsQ0FBQztBQUNuRSxPQUFPLEVBQUMsaUJBQWlCLEVBQUMsTUFBTSxtQkFBbUIsQ0FBQztBQUVwRCw4RUFBOEU7QUFDOUUsTUFBTSx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