source: trip-planner-front/node_modules/@angular/material/expansion/testing/expansion-harness.d.ts@ 8d391a1

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

initial commit

  • Property mode set to 100644
File size: 3.4 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, HarnessLoader, HarnessPredicate } from '@angular/cdk/testing';
9import { ExpansionPanelHarnessFilters } from './expansion-harness-filters';
10/** Selectors for the various `mat-expansion-panel` sections that may contain user content. */
11export declare const enum MatExpansionPanelSection {
12 HEADER = ".mat-expansion-panel-header",
13 TITLE = ".mat-expansion-panel-header-title",
14 DESCRIPTION = ".mat-expansion-panel-header-description",
15 CONTENT = ".mat-expansion-panel-content"
16}
17/** Harness for interacting with a standard mat-expansion-panel in tests. */
18export declare class MatExpansionPanelHarness extends ContentContainerComponentHarness<MatExpansionPanelSection> {
19 static hostSelector: string;
20 private _header;
21 private _title;
22 private _description;
23 private _expansionIndicator;
24 private _content;
25 /**
26 * Gets a `HarnessPredicate` that can be used to search for an expansion-panel
27 * with specific attributes.
28 * @param options Options for narrowing the search:
29 * - `title` finds an expansion-panel with a specific title text.
30 * - `description` finds an expansion-panel with a specific description text.
31 * - `expanded` finds an expansion-panel that is currently expanded.
32 * - `disabled` finds an expansion-panel that is disabled.
33 * @return a `HarnessPredicate` configured with the given options.
34 */
35 static with(options?: ExpansionPanelHarnessFilters): HarnessPredicate<MatExpansionPanelHarness>;
36 /** Whether the panel is expanded. */
37 isExpanded(): Promise<boolean>;
38 /**
39 * Gets the title text of the panel.
40 * @returns Title text or `null` if no title is set up.
41 */
42 getTitle(): Promise<string | null>;
43 /**
44 * Gets the description text of the panel.
45 * @returns Description text or `null` if no description is set up.
46 */
47 getDescription(): Promise<string | null>;
48 /** Whether the panel is disabled. */
49 isDisabled(): Promise<boolean>;
50 /**
51 * Toggles the expanded state of the panel by clicking on the panel
52 * header. This method will not work if the panel is disabled.
53 */
54 toggle(): Promise<void>;
55 /** Expands the expansion panel if collapsed. */
56 expand(): Promise<void>;
57 /** Collapses the expansion panel if expanded. */
58 collapse(): Promise<void>;
59 /** Gets the text content of the panel. */
60 getTextContent(): Promise<string>;
61 /**
62 * Gets a `HarnessLoader` that can be used to load harnesses for
63 * components within the panel's content area.
64 * @deprecated Use either `getChildLoader(MatExpansionPanelSection.CONTENT)`, `getHarness` or
65 * `getAllHarnesses` instead.
66 * @breaking-change 12.0.0
67 */
68 getHarnessLoaderForContent(): Promise<HarnessLoader>;
69 /** Focuses the panel. */
70 focus(): Promise<void>;
71 /** Blurs the panel. */
72 blur(): Promise<void>;
73 /** Whether the panel is focused. */
74 isFocused(): Promise<boolean>;
75 /** Whether the panel has a toggle indicator displayed. */
76 hasToggleIndicator(): Promise<boolean>;
77 /** Gets the position of the toggle indicator. */
78 getToggleIndicatorPosition(): Promise<'before' | 'after'>;
79}
Note: See TracBrowser for help on using the repository browser.