source: trip-planner-front/node_modules/@angular/material/select/testing/select-harness.d.ts@ 188ee53

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

initial commit

  • Property mode set to 100644
File size: 4.0 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, ComponentHarness, BaseHarnessFilters, ComponentHarnessConstructor } from '@angular/cdk/testing';
9import { MatFormFieldControlHarness } from '@angular/material/form-field/testing/control';
10import { MatOptionHarness, MatOptgroupHarness, OptionHarnessFilters, OptgroupHarnessFilters } from '@angular/material/core/testing';
11import { SelectHarnessFilters } from './select-harness-filters';
12export declare abstract class _MatSelectHarnessBase<OptionType extends (ComponentHarnessConstructor<Option> & {
13 with: (options?: OptionFilters) => HarnessPredicate<Option>;
14}), Option extends ComponentHarness & {
15 click(): Promise<void>;
16}, OptionFilters extends BaseHarnessFilters, OptionGroupType extends (ComponentHarnessConstructor<OptionGroup> & {
17 with: (options?: OptionGroupFilters) => HarnessPredicate<OptionGroup>;
18}), OptionGroup extends ComponentHarness, OptionGroupFilters extends BaseHarnessFilters> extends MatFormFieldControlHarness {
19 protected abstract _prefix: string;
20 protected abstract _optionClass: OptionType;
21 protected abstract _optionGroupClass: OptionGroupType;
22 private _documentRootLocator;
23 private _backdrop;
24 /** Gets a boolean promise indicating if the select is disabled. */
25 isDisabled(): Promise<boolean>;
26 /** Gets a boolean promise indicating if the select is valid. */
27 isValid(): Promise<boolean>;
28 /** Gets a boolean promise indicating if the select is required. */
29 isRequired(): Promise<boolean>;
30 /** Gets a boolean promise indicating if the select is empty (no value is selected). */
31 isEmpty(): Promise<boolean>;
32 /** Gets a boolean promise indicating if the select is in multi-selection mode. */
33 isMultiple(): Promise<boolean>;
34 /** Gets a promise for the select's value text. */
35 getValueText(): Promise<string>;
36 /** Focuses the select and returns a void promise that indicates when the action is complete. */
37 focus(): Promise<void>;
38 /** Blurs the select and returns a void promise that indicates when the action is complete. */
39 blur(): Promise<void>;
40 /** Whether the select is focused. */
41 isFocused(): Promise<boolean>;
42 /** Gets the options inside the select panel. */
43 getOptions(filter?: Omit<OptionFilters, 'ancestor'>): Promise<Option[]>;
44 /** Gets the groups of options inside the panel. */
45 getOptionGroups(filter?: Omit<OptionGroupFilters, 'ancestor'>): Promise<OptionGroup[]>;
46 /** Gets whether the select is open. */
47 isOpen(): Promise<boolean>;
48 /** Opens the select's panel. */
49 open(): Promise<void>;
50 /**
51 * Clicks the options that match the passed-in filter. If the select is in multi-selection
52 * mode all options will be clicked, otherwise the harness will pick the first matching option.
53 */
54 clickOptions(filter?: OptionFilters): Promise<void>;
55 /** Closes the select's panel. */
56 close(): Promise<void>;
57 /** Gets the selector that should be used to find this select's panel. */
58 private _getPanelSelector;
59}
60/** Harness for interacting with a standard mat-select in tests. */
61export declare class MatSelectHarness extends _MatSelectHarnessBase<typeof MatOptionHarness, MatOptionHarness, OptionHarnessFilters, typeof MatOptgroupHarness, MatOptgroupHarness, OptgroupHarnessFilters> {
62 static hostSelector: string;
63 protected _prefix: string;
64 protected _optionClass: typeof MatOptionHarness;
65 protected _optionGroupClass: typeof MatOptgroupHarness;
66 /**
67 * Gets a `HarnessPredicate` that can be used to search for a `MatSelectHarness` that meets
68 * certain criteria.
69 * @param options Options for filtering which select instances are considered a match.
70 * @return a `HarnessPredicate` configured with the given options.
71 */
72 static with(options?: SelectHarnessFilters): HarnessPredicate<MatSelectHarness>;
73}
Note: See TracBrowser for help on using the repository browser.