source: trip-planner-front/node_modules/@angular/material/input/testing/native-select-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.3 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 { HarnessPredicate } from '@angular/cdk/testing';
9import { MatFormFieldControlHarness } from '@angular/material/form-field/testing/control';
10import { MatNativeOptionHarness } from './native-option-harness';
11import { NativeOptionHarnessFilters, NativeSelectHarnessFilters } from './native-select-harness-filters';
12/** Harness for interacting with a native `select` in tests. */
13export declare class MatNativeSelectHarness extends MatFormFieldControlHarness {
14 static hostSelector: string;
15 /**
16 * Gets a `HarnessPredicate` that can be used to search for a `MatNativeSelectHarness` that meets
17 * certain criteria.
18 * @param options Options for filtering which select instances are considered a match.
19 * @return a `HarnessPredicate` configured with the given options.
20 */
21 static with(options?: NativeSelectHarnessFilters): HarnessPredicate<MatNativeSelectHarness>;
22 /** Gets a boolean promise indicating if the select is disabled. */
23 isDisabled(): Promise<boolean>;
24 /** Gets a boolean promise indicating if the select is required. */
25 isRequired(): Promise<boolean>;
26 /** Gets a boolean promise indicating if the select is in multi-selection mode. */
27 isMultiple(): Promise<boolean>;
28 /** Gets the name of the select. */
29 getName(): Promise<string>;
30 /** Gets the id of the select. */
31 getId(): Promise<string>;
32 /** Focuses the select and returns a void promise that indicates when the action is complete. */
33 focus(): Promise<void>;
34 /** Blurs the select and returns a void promise that indicates when the action is complete. */
35 blur(): Promise<void>;
36 /** Whether the select is focused. */
37 isFocused(): Promise<boolean>;
38 /** Gets the options inside the select panel. */
39 getOptions(filter?: NativeOptionHarnessFilters): Promise<MatNativeOptionHarness[]>;
40 /**
41 * Selects the options that match the passed-in filter. If the select is in multi-selection
42 * mode all options will be clicked, otherwise the harness will pick the first matching option.
43 */
44 selectOptions(filter?: NativeOptionHarnessFilters): Promise<void>;
45}
Note: See TracBrowser for help on using the repository browser.