[6a3a178] | 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 { HarnessPredicate } from '@angular/cdk/testing';
|
---|
| 9 | import { MatFormFieldControlHarness } from '@angular/material/form-field/testing/control';
|
---|
| 10 | import { InputHarnessFilters } from './input-harness-filters';
|
---|
| 11 | /** Harness for interacting with a standard Material inputs in tests. */
|
---|
| 12 | export declare class MatInputHarness extends MatFormFieldControlHarness {
|
---|
| 13 | static hostSelector: string;
|
---|
| 14 | /**
|
---|
| 15 | * Gets a `HarnessPredicate` that can be used to search for a `MatInputHarness` that meets
|
---|
| 16 | * certain criteria.
|
---|
| 17 | * @param options Options for filtering which input instances are considered a match.
|
---|
| 18 | * @return a `HarnessPredicate` configured with the given options.
|
---|
| 19 | */
|
---|
| 20 | static with(options?: InputHarnessFilters): HarnessPredicate<MatInputHarness>;
|
---|
| 21 | /** Whether the input is disabled. */
|
---|
| 22 | isDisabled(): Promise<boolean>;
|
---|
| 23 | /** Whether the input is required. */
|
---|
| 24 | isRequired(): Promise<boolean>;
|
---|
| 25 | /** Whether the input is readonly. */
|
---|
| 26 | isReadonly(): Promise<boolean>;
|
---|
| 27 | /** Gets the value of the input. */
|
---|
| 28 | getValue(): Promise<string>;
|
---|
| 29 | /** Gets the name of the input. */
|
---|
| 30 | getName(): Promise<string>;
|
---|
| 31 | /**
|
---|
| 32 | * Gets the type of the input. Returns "textarea" if the input is
|
---|
| 33 | * a textarea.
|
---|
| 34 | */
|
---|
| 35 | getType(): Promise<string>;
|
---|
| 36 | /** Gets the placeholder of the input. */
|
---|
| 37 | getPlaceholder(): Promise<string>;
|
---|
| 38 | /** Gets the id of the input. */
|
---|
| 39 | getId(): Promise<string>;
|
---|
| 40 | /**
|
---|
| 41 | * Focuses the input and returns a promise that indicates when the
|
---|
| 42 | * action is complete.
|
---|
| 43 | */
|
---|
| 44 | focus(): Promise<void>;
|
---|
| 45 | /**
|
---|
| 46 | * Blurs the input and returns a promise that indicates when the
|
---|
| 47 | * action is complete.
|
---|
| 48 | */
|
---|
| 49 | blur(): Promise<void>;
|
---|
| 50 | /** Whether the input is focused. */
|
---|
| 51 | isFocused(): Promise<boolean>;
|
---|
| 52 | /**
|
---|
| 53 | * Sets the value of the input. The value will be set by simulating
|
---|
| 54 | * keypresses that correspond to the given value.
|
---|
| 55 | */
|
---|
| 56 | setValue(newValue: string): Promise<void>;
|
---|
| 57 | }
|
---|