/** * @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 { HarnessPredicate } from '@angular/cdk/testing'; import { MatListOptionCheckboxPosition } from '@angular/material/list'; import { MatListHarnessBase } from './list-harness-base'; import { ListItemHarnessFilters, ListOptionHarnessFilters, SelectionListHarnessFilters } from './list-harness-filters'; import { MatListItemHarnessBase } from './list-item-harness-base'; /** Harness for interacting with a standard mat-selection-list in tests. */ export declare class MatSelectionListHarness extends MatListHarnessBase { /** The selector for the host element of a `MatSelectionList` instance. */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a `MatSelectionListHarness` that meets * certain criteria. * @param options Options for filtering which selection list instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with(options?: SelectionListHarnessFilters): HarnessPredicate; _itemHarness: typeof MatListOptionHarness; /** Whether the selection list is disabled. */ isDisabled(): Promise; /** * Selects all items matching any of the given filters. * @param filters Filters that specify which items should be selected. */ selectItems(...filters: ListOptionHarnessFilters[]): Promise; /** * Deselects all items matching any of the given filters. * @param filters Filters that specify which items should be deselected. */ deselectItems(...filters: ListItemHarnessFilters[]): Promise; /** Gets all items matching the given list of filters. */ private _getItems; } /** Harness for interacting with a list option. */ export declare class MatListOptionHarness extends MatListItemHarnessBase { /** The selector for the host element of a `MatListOption` instance. */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a `MatListOptionHarness` that * meets certain criteria. * @param options Options for filtering which list option instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with(options?: ListOptionHarnessFilters): HarnessPredicate; private _itemContent; /** Gets the position of the checkbox relative to the list option content. */ getCheckboxPosition(): Promise; /** Whether the list option is selected. */ isSelected(): Promise; /** Whether the list option is disabled. */ isDisabled(): Promise; /** Focuses the list option. */ focus(): Promise; /** Blurs the list option. */ blur(): Promise; /** Whether the list option is focused. */ isFocused(): Promise; /** Toggles the checked state of the checkbox. */ toggle(): Promise; /** * Puts the list option in a checked state by toggling it if it is currently unchecked, or doing * nothing if it is already checked. */ select(): Promise; /** * Puts the list option in an unchecked state by toggling it if it is currently checked, or doing * nothing if it is already unchecked. */ deselect(): Promise; }