source: trip-planner-front/node_modules/@angular/material/list/testing/selection-list-harness.d.ts

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: 3.6 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 { HarnessPredicate } from '@angular/cdk/testing';
9import { MatListOptionCheckboxPosition } from '@angular/material/list';
10import { MatListHarnessBase } from './list-harness-base';
11import { ListItemHarnessFilters, ListOptionHarnessFilters, SelectionListHarnessFilters } from './list-harness-filters';
12import { MatListItemHarnessBase } from './list-item-harness-base';
13/** Harness for interacting with a standard mat-selection-list in tests. */
14export declare class MatSelectionListHarness extends MatListHarnessBase<typeof MatListOptionHarness, MatListOptionHarness, ListOptionHarnessFilters> {
15 /** The selector for the host element of a `MatSelectionList` instance. */
16 static hostSelector: string;
17 /**
18 * Gets a `HarnessPredicate` that can be used to search for a `MatSelectionListHarness` that meets
19 * certain criteria.
20 * @param options Options for filtering which selection list instances are considered a match.
21 * @return a `HarnessPredicate` configured with the given options.
22 */
23 static with(options?: SelectionListHarnessFilters): HarnessPredicate<MatSelectionListHarness>;
24 _itemHarness: typeof MatListOptionHarness;
25 /** Whether the selection list is disabled. */
26 isDisabled(): Promise<boolean>;
27 /**
28 * Selects all items matching any of the given filters.
29 * @param filters Filters that specify which items should be selected.
30 */
31 selectItems(...filters: ListOptionHarnessFilters[]): Promise<void>;
32 /**
33 * Deselects all items matching any of the given filters.
34 * @param filters Filters that specify which items should be deselected.
35 */
36 deselectItems(...filters: ListItemHarnessFilters[]): Promise<void>;
37 /** Gets all items matching the given list of filters. */
38 private _getItems;
39}
40/** Harness for interacting with a list option. */
41export declare class MatListOptionHarness extends MatListItemHarnessBase {
42 /** The selector for the host element of a `MatListOption` instance. */
43 static hostSelector: string;
44 /**
45 * Gets a `HarnessPredicate` that can be used to search for a `MatListOptionHarness` that
46 * meets certain criteria.
47 * @param options Options for filtering which list option instances are considered a match.
48 * @return a `HarnessPredicate` configured with the given options.
49 */
50 static with(options?: ListOptionHarnessFilters): HarnessPredicate<MatListOptionHarness>;
51 private _itemContent;
52 /** Gets the position of the checkbox relative to the list option content. */
53 getCheckboxPosition(): Promise<MatListOptionCheckboxPosition>;
54 /** Whether the list option is selected. */
55 isSelected(): Promise<boolean>;
56 /** Whether the list option is disabled. */
57 isDisabled(): Promise<boolean>;
58 /** Focuses the list option. */
59 focus(): Promise<void>;
60 /** Blurs the list option. */
61 blur(): Promise<void>;
62 /** Whether the list option is focused. */
63 isFocused(): Promise<boolean>;
64 /** Toggles the checked state of the checkbox. */
65 toggle(): Promise<void>;
66 /**
67 * Puts the list option in a checked state by toggling it if it is currently unchecked, or doing
68 * nothing if it is already checked.
69 */
70 select(): Promise<void>;
71 /**
72 * Puts the list option in an unchecked state by toggling it if it is currently checked, or doing
73 * nothing if it is already unchecked.
74 */
75 deselect(): Promise<void>;
76}
Note: See TracBrowser for help on using the repository browser.