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 { HarnessPredicate } from '@angular/cdk/testing';
|
---|
9 | import { MatListHarnessBase } from './list-harness-base';
|
---|
10 | import { NavListHarnessFilters, NavListItemHarnessFilters } from './list-harness-filters';
|
---|
11 | import { MatListItemHarnessBase } from './list-item-harness-base';
|
---|
12 | /** Harness for interacting with a standard mat-nav-list in tests. */
|
---|
13 | export declare class MatNavListHarness extends MatListHarnessBase<typeof MatNavListItemHarness, MatNavListItemHarness, NavListItemHarnessFilters> {
|
---|
14 | /** The selector for the host element of a `MatNavList` instance. */
|
---|
15 | static hostSelector: string;
|
---|
16 | /**
|
---|
17 | * Gets a `HarnessPredicate` that can be used to search for a `MatNavListHarness` that meets
|
---|
18 | * certain criteria.
|
---|
19 | * @param options Options for filtering which nav list instances are considered a match.
|
---|
20 | * @return a `HarnessPredicate` configured with the given options.
|
---|
21 | */
|
---|
22 | static with(options?: NavListHarnessFilters): HarnessPredicate<MatNavListHarness>;
|
---|
23 | _itemHarness: typeof MatNavListItemHarness;
|
---|
24 | }
|
---|
25 | /** Harness for interacting with a nav list item. */
|
---|
26 | export declare class MatNavListItemHarness extends MatListItemHarnessBase {
|
---|
27 | /** The selector for the host element of a `MatListItem` instance. */
|
---|
28 | static hostSelector: string;
|
---|
29 | /**
|
---|
30 | * Gets a `HarnessPredicate` that can be used to search for a `MatNavListItemHarness` that
|
---|
31 | * meets certain criteria.
|
---|
32 | * @param options Options for filtering which nav list item instances are considered a match.
|
---|
33 | * @return a `HarnessPredicate` configured with the given options.
|
---|
34 | */
|
---|
35 | static with(options?: NavListItemHarnessFilters): HarnessPredicate<MatNavListItemHarness>;
|
---|
36 | /** Gets the href for this nav list item. */
|
---|
37 | getHref(): Promise<string | null>;
|
---|
38 | /** Clicks on the nav list item. */
|
---|
39 | click(): Promise<void>;
|
---|
40 | /** Focuses the nav list item. */
|
---|
41 | focus(): Promise<void>;
|
---|
42 | /** Blurs the nav list item. */
|
---|
43 | blur(): Promise<void>;
|
---|
44 | /** Whether the nav list item is focused. */
|
---|
45 | isFocused(): Promise<boolean>;
|
---|
46 | }
|
---|