import { BaseHarnessFilters, ContentContainerComponentHarness, ComponentHarnessConstructor, HarnessPredicate, HarnessLoader } from '@angular/cdk/testing'; /** A set of criteria that can be used to filter a list of `MatMenuHarness` instances. */ interface MenuHarnessFilters extends BaseHarnessFilters { /** Only find instances whose trigger text matches the given value. */ triggerText?: string | RegExp; } /** A set of criteria that can be used to filter a list of `MatMenuItemHarness` instances. */ interface MenuItemHarnessFilters extends BaseHarnessFilters { /** Only find instances whose text matches the given value. */ text?: string | RegExp; /** Only find instances that have a sub-menu. */ hasSubmenu?: boolean; } /** Harness for interacting with a mat-menu in tests. */ declare class MatMenuHarness extends ContentContainerComponentHarness { private _documentRootLocator; /** The selector for the host element of a `MatMenu` instance. */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a menu with specific attributes. * @param options Options for filtering which menu instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with(this: ComponentHarnessConstructor, options?: MenuHarnessFilters): HarnessPredicate; /** Whether the menu is disabled. */ isDisabled(): Promise; /** Whether the menu is open. */ isOpen(): Promise; /** Gets the text of the menu's trigger element. */ getTriggerText(): Promise; /** Focuses the menu. */ focus(): Promise; /** Blurs the menu. */ blur(): Promise; /** Whether the menu is focused. */ isFocused(): Promise; /** Opens the menu. */ open(): Promise; /** Closes the menu. */ close(): Promise; /** * Gets a list of `MatMenuItemHarness` representing the items in the menu. * @param filters Optionally filters which menu items are included. */ getItems(filters?: Omit): Promise; /** * Clicks an item in the menu, and optionally continues clicking items in subsequent sub-menus. * @param itemFilter A filter used to represent which item in the menu should be clicked. The * first matching menu item will be clicked. * @param subItemFilters A list of filters representing the items to click in any subsequent * sub-menus. The first item in the sub-menu matching the corresponding filter in * `subItemFilters` will be clicked. */ clickItem(itemFilter: Omit, ...subItemFilters: Omit[]): Promise; protected getRootHarnessLoader(): Promise; /** Gets the menu panel associated with this menu. */ private _getMenuPanel; /** Gets the id of the menu panel associated with this menu. */ private _getPanelId; } declare class MatMenuItemHarness extends ContentContainerComponentHarness { /** The selector for the host element of a `MatMenuItem` instance. */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a menu item with specific attributes. * @param options Options for filtering which menu item instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with(this: ComponentHarnessConstructor, options?: MenuItemHarnessFilters): HarnessPredicate; /** Whether the menu is disabled. */ isDisabled(): Promise; /** Gets the text of the menu item. */ getText(): Promise; /** Focuses the menu item. */ focus(): Promise; /** Blurs the menu item. */ blur(): Promise; /** Whether the menu item is focused. */ isFocused(): Promise; /** Clicks the menu item. */ click(): Promise; /** Whether this item has a submenu. */ hasSubmenu(): Promise; /** Gets the submenu associated with this menu item, or null if none. */ getSubmenu(): Promise; } export { MatMenuHarness, MatMenuItemHarness }; export type { MenuHarnessFilters, MenuItemHarnessFilters };