import { ComponentHarness, BaseHarnessFilters, HarnessPredicate } from '@angular/cdk/testing'; /** * Test harness for menu component * * Stripped-down version of the Angular Material menu test harness (.../menu/menu-harness.ts) * just to get things going. */ export declare class GraniteMenuHarness extends ComponentHarness { /** * The selector for the host element of a `MenuComponent` instance, * i.e. the button element used to open the menu. */ static hostSelector: string; private _documentRootLocator; /** * Gets a `HarnessPredicate` that can be used to search for a `MenuHarness` that meets * certain criteria. * @param options Options for filtering which menu item instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with(options?: GraniteMenuHarnessFilters): HarnessPredicate; /** Gets the text of the menu trigger */ getText(): Promise; /** Opens the menu, unless already open */ open(): Promise; /** Closes the menu, unless already closed */ close(): Promise; /** Whether the menu is open */ isOpen(): Promise; /** * Gets a list of `GraniteMenuItemHarness` representing the items in the menu. * @param filters Optionally filters which menu items are included. */ getItems(filters?: Omit): Promise; /** Gets the menu panel (popup) associated with the menu */ private _getMenuPanel; /** Gets the id of the menu panel (popup) associated with this menu */ private _getPanelId; } export declare class GraniteMenuItemHarness extends ComponentHarness { /** The selector for the host element of a `MenuItemComponent` instance. */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a `GraniteMenuItemHarness` that meets * certain criteria. * @param options Options for filtering which menu item instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with(options?: GraniteMenuItemHarnessFilters): HarnessPredicate; /** Gets the text of the menu item. */ getText(): Promise; /** Whether this item has a submenu. */ hasSubmenu(): Promise; /** Gets the submenu associated with this menu item, or null if none. */ getSubmenu(): Promise; /** Clicks the menu item. */ click(): Promise; } /** A set of criteria that can be used to filter a list of `MenuHarness` instances. */ export interface GraniteMenuHarnessFilters extends BaseHarnessFilters { /** Only find instances whose text matches the given value. */ text?: string | RegExp; } /** A set of criteria that can be used to filter a list of `GraniteMenuItemHarness` instances. */ export interface GraniteMenuItemHarnessFilters extends BaseHarnessFilters { /** Only find instances whose text matches the given value. */ text?: string | RegExp; }