source: trip-planner-front/node_modules/@angular/material/chips/testing/chip-harness.d.ts@ e29cc2e

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

initial commit

  • Property mode set to 100644
File size: 2.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 { ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
9import { MatChipAvatarHarness } from './chip-avatar-harness';
10import { ChipAvatarHarnessFilters, ChipHarnessFilters, ChipRemoveHarnessFilters } from './chip-harness-filters';
11import { MatChipRemoveHarness } from './chip-remove-harness';
12/** Harness for interacting with a standard selectable Angular Material chip in tests. */
13export declare class MatChipHarness extends ContentContainerComponentHarness {
14 /** The selector for the host element of a `MatChip` instance. */
15 static hostSelector: string;
16 /**
17 * Gets a `HarnessPredicate` that can be used to search for a `MatChipHarness` that meets
18 * certain criteria.
19 * @param options Options for filtering which chip instances are considered a match.
20 * @return a `HarnessPredicate` configured with the given options.
21 */
22 static with(options?: ChipHarnessFilters): HarnessPredicate<MatChipHarness>;
23 /** Gets the text of the chip. */
24 getText(): Promise<string>;
25 /**
26 * Whether the chip is selected.
27 * @deprecated Use `MatChipOptionHarness.isSelected` instead.
28 * @breaking-change 12.0.0
29 */
30 isSelected(): Promise<boolean>;
31 /** Whether the chip is disabled. */
32 isDisabled(): Promise<boolean>;
33 /**
34 * Selects the given chip. Only applies if it's selectable.
35 * @deprecated Use `MatChipOptionHarness.select` instead.
36 * @breaking-change 12.0.0
37 */
38 select(): Promise<void>;
39 /**
40 * Deselects the given chip. Only applies if it's selectable.
41 * @deprecated Use `MatChipOptionHarness.deselect` instead.
42 * @breaking-change 12.0.0
43 */
44 deselect(): Promise<void>;
45 /**
46 * Toggles the selected state of the given chip. Only applies if it's selectable.
47 * @deprecated Use `MatChipOptionHarness.toggle` instead.
48 * @breaking-change 12.0.0
49 */
50 toggle(): Promise<void>;
51 /** Removes the given chip. Only applies if it's removable. */
52 remove(): Promise<void>;
53 /**
54 * Gets the remove button inside of a chip.
55 * @param filter Optionally filters which remove buttons are included.
56 */
57 getRemoveButton(filter?: ChipRemoveHarnessFilters): Promise<MatChipRemoveHarness>;
58 /**
59 * Gets the avatar inside a chip.
60 * @param filter Optionally filters which avatars are included.
61 */
62 getAvatar(filter?: ChipAvatarHarnessFilters): Promise<MatChipAvatarHarness | null>;
63}
Note: See TracBrowser for help on using the repository browser.