source: trip-planner-front/node_modules/@angular/material/slide-toggle/testing/slide-toggle-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: 2.7 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 { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
9import { SlideToggleHarnessFilters } from './slide-toggle-harness-filters';
10export declare abstract class _MatSlideToggleHarnessBase extends ComponentHarness {
11 private _label;
12 protected _input: import("@angular/cdk/testing").AsyncFactoryFn<import("@angular/cdk/testing").TestElement>;
13 /** Toggle the checked state of the slide-toggle. */
14 abstract toggle(): Promise<void>;
15 /** Whether the slide-toggle is checked. */
16 isChecked(): Promise<boolean>;
17 /** Whether the slide-toggle is disabled. */
18 isDisabled(): Promise<boolean>;
19 /** Whether the slide-toggle is required. */
20 isRequired(): Promise<boolean>;
21 /** Whether the slide-toggle is valid. */
22 isValid(): Promise<boolean>;
23 /** Gets the slide-toggle's name. */
24 getName(): Promise<string | null>;
25 /** Gets the slide-toggle's aria-label. */
26 getAriaLabel(): Promise<string | null>;
27 /** Gets the slide-toggle's aria-labelledby. */
28 getAriaLabelledby(): Promise<string | null>;
29 /** Gets the slide-toggle's label text. */
30 getLabelText(): Promise<string>;
31 /** Focuses the slide-toggle. */
32 focus(): Promise<void>;
33 /** Blurs the slide-toggle. */
34 blur(): Promise<void>;
35 /** Whether the slide-toggle is focused. */
36 isFocused(): Promise<boolean>;
37 /**
38 * Puts the slide-toggle in a checked state by toggling it if it is currently unchecked, or doing
39 * nothing if it is already checked.
40 */
41 check(): Promise<void>;
42 /**
43 * Puts the slide-toggle in an unchecked state by toggling it if it is currently checked, or doing
44 * nothing if it is already unchecked.
45 */
46 uncheck(): Promise<void>;
47}
48/** Harness for interacting with a standard mat-slide-toggle in tests. */
49export declare class MatSlideToggleHarness extends _MatSlideToggleHarnessBase {
50 /** The selector for the host element of a `MatSlideToggle` instance. */
51 static hostSelector: string;
52 /**
53 * Gets a `HarnessPredicate` that can be used to search for a `MatSlideToggleHarness` that meets
54 * certain criteria.
55 * @param options Options for filtering which slide toggle instances are considered a match.
56 * @return a `HarnessPredicate` configured with the given options.
57 */
58 static with(options?: SlideToggleHarnessFilters): HarnessPredicate<MatSlideToggleHarness>;
59 private _inputContainer;
60 /** Toggle the checked state of the slide-toggle. */
61 toggle(): Promise<void>;
62}
Note: See TracBrowser for help on using the repository browser.