MCPcopy Create free account
hub / github.com/angular/components / clickItem

Method clickItem

src/material/menu/testing/menu-harness.ts:121–127  ·  view source on GitHub ↗

* 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

(
    itemFilter: Omit<MenuItemHarnessFilters, 'ancestor'>,
    ...subItemFilters: Omit<MenuItemHarnessFilters, 'ancestor'>[]
  )

Source from the content-addressed store, hash-verified

119 * `subItemFilters` will be clicked.
120 */
121 async clickItem(
122 itemFilter: Omit<MenuItemHarnessFilters, 'ancestor'>,
123 ...subItemFilters: Omit<MenuItemHarnessFilters, 'ancestor'>[]
124 ): Promise<void> {
125 await this.open();
126 return clickItemImplementation(await this.getItems(itemFilter), itemFilter, subItemFilters);
127 }
128
129 protected override async getRootHarnessLoader(): Promise<HarnessLoader> {
130 const panelId = await this._getPanelId();

Callers 2

clickItemImplementationFunction · 0.45

Calls 3

openMethod · 0.95
getItemsMethod · 0.95
clickItemImplementationFunction · 0.85

Tested by

no test coverage detected