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 { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
---|
9 | import { MatChipHarness } from './chip-harness';
|
---|
10 | import { MatChipInputHarness } from './chip-input-harness';
|
---|
11 | import { ChipListHarnessFilters, ChipHarnessFilters, ChipInputHarnessFilters } from './chip-harness-filters';
|
---|
12 | /** Base class for chip list harnesses. */
|
---|
13 | export declare abstract class _MatChipListHarnessBase extends ComponentHarness {
|
---|
14 | /** Gets whether the chip list is disabled. */
|
---|
15 | isDisabled(): Promise<boolean>;
|
---|
16 | /** Gets whether the chip list is required. */
|
---|
17 | isRequired(): Promise<boolean>;
|
---|
18 | /** Gets whether the chip list is invalid. */
|
---|
19 | isInvalid(): Promise<boolean>;
|
---|
20 | /** Gets whether the chip list is in multi selection mode. */
|
---|
21 | isMultiple(): Promise<boolean>;
|
---|
22 | /** Gets whether the orientation of the chip list. */
|
---|
23 | getOrientation(): Promise<'horizontal' | 'vertical'>;
|
---|
24 | }
|
---|
25 | /** Harness for interacting with a standard chip list in tests. */
|
---|
26 | export declare class MatChipListHarness extends _MatChipListHarnessBase {
|
---|
27 | /** The selector for the host element of a `MatChipList` instance. */
|
---|
28 | static hostSelector: string;
|
---|
29 | /**
|
---|
30 | * Gets a `HarnessPredicate` that can be used to search for a `MatChipListHarness` that meets
|
---|
31 | * certain criteria.
|
---|
32 | * @param options Options for filtering which chip list instances are considered a match.
|
---|
33 | * @return a `HarnessPredicate` configured with the given options.
|
---|
34 | */
|
---|
35 | static with(options?: ChipListHarnessFilters): HarnessPredicate<MatChipListHarness>;
|
---|
36 | /**
|
---|
37 | * Gets the list of chips inside the chip list.
|
---|
38 | * @param filter Optionally filters which chips are included.
|
---|
39 | */
|
---|
40 | getChips(filter?: ChipHarnessFilters): Promise<MatChipHarness[]>;
|
---|
41 | /**
|
---|
42 | * Selects a chip inside the chip list.
|
---|
43 | * @param filter An optional filter to apply to the child chips.
|
---|
44 | * All the chips matching the filter will be selected.
|
---|
45 | * @deprecated Use `MatChipListboxHarness.selectChips` instead.
|
---|
46 | * @breaking-change 12.0.0
|
---|
47 | */
|
---|
48 | selectChips(filter?: ChipHarnessFilters): Promise<void>;
|
---|
49 | /**
|
---|
50 | * Gets the `MatChipInput` inside the chip list.
|
---|
51 | * @param filter Optionally filters which chip input is included.
|
---|
52 | */
|
---|
53 | getInput(filter?: ChipInputHarnessFilters): Promise<MatChipInputHarness>;
|
---|
54 | }
|
---|