-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathinput-harness.d-5a0b8058.d.ts
executable file
·61 lines (58 loc) · 2.29 KB
/
input-harness.d-5a0b8058.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import { BaseHarnessFilters, HarnessPredicate } from '@angular/cdk/testing';
import { M as MatFormFieldControlHarness } from './form-field-control-harness.d-8ec51e17.js';
/** A set of criteria that can be used to filter a list of `MatInputHarness` instances. */
interface InputHarnessFilters extends BaseHarnessFilters {
/** Filters based on the value of the input. */
value?: string | RegExp;
/** Filters based on the placeholder text of the input. */
placeholder?: string | RegExp;
}
/** Harness for interacting with a standard Material inputs in tests. */
declare class MatInputHarness extends MatFormFieldControlHarness {
static hostSelector: string;
/**
* Gets a `HarnessPredicate` that can be used to search for a `MatInputHarness` that meets
* certain criteria.
* @param options Options for filtering which input instances are considered a match.
* @return a `HarnessPredicate` configured with the given options.
*/
static with(options?: InputHarnessFilters): HarnessPredicate<MatInputHarness>;
/** Whether the input is disabled. */
isDisabled(): Promise<boolean>;
/** Whether the input is required. */
isRequired(): Promise<boolean>;
/** Whether the input is readonly. */
isReadonly(): Promise<boolean>;
/** Gets the value of the input. */
getValue(): Promise<string>;
/** Gets the name of the input. */
getName(): Promise<string>;
/**
* Gets the type of the input. Returns "textarea" if the input is
* a textarea.
*/
getType(): Promise<string>;
/** Gets the placeholder of the input. */
getPlaceholder(): Promise<string>;
/** Gets the id of the input. */
getId(): Promise<string>;
/**
* Focuses the input and returns a promise that indicates when the
* action is complete.
*/
focus(): Promise<void>;
/**
* Blurs the input and returns a promise that indicates when the
* action is complete.
*/
blur(): Promise<void>;
/** Whether the input is focused. */
isFocused(): Promise<boolean>;
/**
* Sets the value of the input. The value will be set by simulating
* keypresses that correspond to the given value.
*/
setValue(newValue: string): Promise<void>;
}
export { MatInputHarness as M };
export type { InputHarnessFilters as I };