MCPcopy Index your code
hub / github.com/angular/components / getMenuItem

Function getMenuItem

src/aria/menu/menu.spec.ts:922–927  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

920 }
921
922 function getMenuItem(text: string): HTMLElement | null {
923 const items = fixture.debugElement
924 .queryAll(By.directive(MenuItem))
925 .map((debugEl: DebugElement) => debugEl.nativeElement as HTMLElement);
926 return items.find(item => item.textContent?.trim() === text) || null;
927 }
928
929 function isExpanded(menuBarItemText: string): boolean {
930 return getMenuBarItem(menuBarItemText)?.getAttribute('aria-expanded') === 'true';

Callers 1

menu.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…