source: trip-planner-front/node_modules/@angular/material/esm2015/sidenav/testing/sidenav-container-harness.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 5.2 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 */
8import { __awaiter } from "tslib";
9import { ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
10import { MatSidenavContentHarness } from './sidenav-content-harness';
11import { MatSidenavHarness } from './sidenav-harness';
12/** Harness for interacting with a standard mat-sidenav-container in tests. */
13export class MatSidenavContainerHarness extends ContentContainerComponentHarness {
14 /**
15 * Gets a `HarnessPredicate` that can be used to search for a `MatSidenavContainerHarness` that
16 * meets certain criteria.
17 * @param options Options for filtering which container instances are considered a match.
18 * @return a `HarnessPredicate` configured with the given options.
19 */
20 static with(options = {}) {
21 return new HarnessPredicate(MatSidenavContainerHarness, options);
22 }
23 /**
24 * Gets sidenavs that match particular criteria within the container.
25 * @param filter Optionally filters which chips are included.
26 */
27 getSidenavs(filter = {}) {
28 return __awaiter(this, void 0, void 0, function* () {
29 return this.locatorForAll(MatSidenavHarness.with(filter))();
30 });
31 }
32 /** Gets the element that has the container's content. */
33 getContent() {
34 return __awaiter(this, void 0, void 0, function* () {
35 return this.locatorFor(MatSidenavContentHarness)();
36 });
37 }
38}
39/** The selector for the host element of a `MatSidenavContainer` instance. */
40MatSidenavContainerHarness.hostSelector = '.mat-sidenav-container';
41//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2lkZW5hdi1jb250YWluZXItaGFybmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tYXRlcmlhbC9zaWRlbmF2L3Rlc3Rpbmcvc2lkZW5hdi1jb250YWluZXItaGFybmVzcy50cyJd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