import { ComponentHarness, BaseHarnessFilters, HarnessPredicate, TestKey } from '@angular/cdk/testing'; /** Harness filters for ComDropdownHarness. */ interface ComDropdownHarnessFilters extends BaseHarnessFilters { /** Filter by the dropdown's placeholder text. */ placeholder?: string | RegExp; /** Filter by whether the dropdown is disabled. */ disabled?: boolean; /** Filter by whether the dropdown is open. */ open?: boolean; } /** Harness filters for ComDropdownOptionHarness. */ interface ComDropdownOptionHarnessFilters extends BaseHarnessFilters { /** Filter by the option's text. */ text?: string | RegExp; /** Filter by whether the option is selected. */ selected?: boolean; /** Filter by whether the option is disabled. */ disabled?: boolean; } /** * Harness for interacting with a dropdown option in tests. */ declare class ComDropdownOptionHarness extends ComponentHarness { static hostSelector: string; private readonly optionElement; /** * Gets a HarnessPredicate for matching dropdown options. * @param options Filter options. */ static with(options?: ComDropdownOptionHarnessFilters): HarnessPredicate; /** Gets the option's text content. */ getText(): Promise; /** Whether the option is currently selected. */ isSelected(): Promise; /** Whether the option is disabled. */ isDisabled(): Promise; /** Whether the option is active (keyboard focused). */ isActive(): Promise; /** Clicks the option to select it. */ click(): Promise; /** Hovers over the option. */ hover(): Promise; } /** * Harness for interacting with a ComDropdown in tests. */ declare class ComDropdownHarness extends ComponentHarness { static hostSelector: string; private readonly trigger; private readonly panel; private readonly searchInput; private readonly clearButton; /** * Gets a HarnessPredicate for matching dropdowns. * @param options Filter options. */ static with(options?: ComDropdownHarnessFilters): HarnessPredicate; /** Gets the dropdown's trigger button text. */ getTriggerText(): Promise; /** Whether the dropdown is currently open. */ isOpen(): Promise; /** Whether the dropdown is disabled. */ isDisabled(): Promise; /** Whether the dropdown has a value selected. */ hasValue(): Promise; /** Opens the dropdown if it's closed. */ open(): Promise; /** Closes the dropdown if it's open. */ close(): Promise; /** Clicks the dropdown trigger. */ click(): Promise; /** Clears the current selection. */ clear(): Promise; /** Sends keyboard input to the dropdown. */ sendKeys(...keys: (string | TestKey)[]): Promise; /** Gets all options in the dropdown. */ getOptions(filters?: ComDropdownOptionHarnessFilters): Promise; /** Gets an option by its text. */ getOption(text: string | RegExp): Promise; /** Selects an option by its text. */ selectOption(text: string | RegExp): Promise; /** Gets the currently selected option(s). */ getSelectedOptions(): Promise; /** Whether the dropdown has a search input. */ isSearchable(): Promise; /** Gets the current search query. */ getSearchQuery(): Promise; /** Types in the search input. */ search(query: string): Promise; /** Clears the search input. */ clearSearch(): Promise; /** Gets the number of visible options. */ getOptionsCount(): Promise; /** Gets all option texts. */ getOptionTexts(): Promise; /** Navigates to an option using keyboard. */ navigateToOption(direction: 'up' | 'down', times?: number): Promise; /** Selects the currently active option. */ selectActiveOption(): Promise; /** Gets the ID of the active descendant. */ getActiveDescendantId(): Promise; /** Gets the panel ID. */ getPanelId(): Promise; /** Gets the aria-controls value from the trigger. */ getAriaControls(): Promise; /** Focuses the dropdown trigger. */ focus(): Promise; /** Blurs the dropdown trigger. */ blur(): Promise; /** Whether the dropdown trigger is focused. */ isFocused(): Promise; } export { ComDropdownHarness, ComDropdownOptionHarness }; export type { ComDropdownHarnessFilters, ComDropdownOptionHarnessFilters };