MCPcopy
hub / github.com/angular/components / close

Method close

src/aria/menu/testing/menu-harness.ts:131–138  ·  view source on GitHub ↗

Closes the menu if it is currently open.

()

Source from the content-addressed store, hash-verified

129
130 /** Closes the menu if it is currently open. */
131 async close(): Promise<void> {
132 if (await this.isOpen()) {
133 const trigger = await this._getTrigger();
134 if (trigger) {
135 await trigger.click();
136 }
137 }
138 }
139
140 /** Queries all menu items inside this menu container. */
141 async getItems(filters: MenuItemHarnessFilters = {}): Promise<MenuItemHarness[]> {

Callers 1

Calls 3

isOpenMethod · 0.95
_getTriggerMethod · 0.95
clickMethod · 0.65

Tested by

no test coverage detected