source: trip-planner-front/node_modules/@angular/material/autocomplete/testing/autocomplete-harness.d.ts@ 571e0df

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

initial commit

  • Property mode set to 100644
File size: 3.4 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 { BaseHarnessFilters, ComponentHarness, ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';
9import { MatOptgroupHarness, MatOptionHarness, OptgroupHarnessFilters, OptionHarnessFilters } from '@angular/material/core/testing';
10import { AutocompleteHarnessFilters } from './autocomplete-harness-filters';
11export declare abstract class _MatAutocompleteHarnessBase<OptionType extends (ComponentHarnessConstructor<Option> & {
12 with: (options?: OptionFilters) => HarnessPredicate<Option>;
13}), Option extends ComponentHarness & {
14 click(): Promise<void>;
15}, OptionFilters extends BaseHarnessFilters, OptionGroupType extends (ComponentHarnessConstructor<OptionGroup> & {
16 with: (options?: OptionGroupFilters) => HarnessPredicate<OptionGroup>;
17}), OptionGroup extends ComponentHarness, OptionGroupFilters extends BaseHarnessFilters> extends ComponentHarness {
18 private _documentRootLocator;
19 protected abstract _prefix: string;
20 protected abstract _optionClass: OptionType;
21 protected abstract _optionGroupClass: OptionGroupType;
22 /** Gets the value of the autocomplete input. */
23 getValue(): Promise<string>;
24 /** Whether the autocomplete input is disabled. */
25 isDisabled(): Promise<boolean>;
26 /** Focuses the autocomplete input. */
27 focus(): Promise<void>;
28 /** Blurs the autocomplete input. */
29 blur(): Promise<void>;
30 /** Whether the autocomplete input is focused. */
31 isFocused(): Promise<boolean>;
32 /** Enters text into the autocomplete. */
33 enterText(value: string): Promise<void>;
34 /** Gets the options inside the autocomplete panel. */
35 getOptions(filters?: Omit<OptionFilters, 'ancestor'>): Promise<Option[]>;
36 /** Gets the option groups inside the autocomplete panel. */
37 getOptionGroups(filters?: Omit<OptionGroupFilters, 'ancestor'>): Promise<OptionGroup[]>;
38 /** Selects the first option matching the given filters. */
39 selectOption(filters: OptionFilters): Promise<void>;
40 /** Whether the autocomplete is open. */
41 isOpen(): Promise<boolean>;
42 /** Gets the panel associated with this autocomplete trigger. */
43 private _getPanel;
44 /** Gets the selector that can be used to find the autocomplete trigger's panel. */
45 private _getPanelSelector;
46}
47/** Harness for interacting with a standard mat-autocomplete in tests. */
48export declare class MatAutocompleteHarness extends _MatAutocompleteHarnessBase<typeof MatOptionHarness, MatOptionHarness, OptionHarnessFilters, typeof MatOptgroupHarness, MatOptgroupHarness, OptgroupHarnessFilters> {
49 protected _prefix: string;
50 protected _optionClass: typeof MatOptionHarness;
51 protected _optionGroupClass: typeof MatOptgroupHarness;
52 /** The selector for the host element of a `MatAutocomplete` instance. */
53 static hostSelector: string;
54 /**
55 * Gets a `HarnessPredicate` that can be used to search for a `MatAutocompleteHarness` that meets
56 * certain criteria.
57 * @param options Options for filtering which autocomplete instances are considered a match.
58 * @return a `HarnessPredicate` configured with the given options.
59 */
60 static with(options?: AutocompleteHarnessFilters): HarnessPredicate<MatAutocompleteHarness>;
61}
Note: See TracBrowser for help on using the repository browser.