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

Function setupMenu

src/aria/menu/menu.spec.ts:57–64  ·  view source on GitHub ↗
(opts?: {textDirection: 'ltr' | 'rtl'})

Source from the content-addressed store, hash-verified

55 };
56
57 async function setupMenu(opts?: {textDirection: 'ltr' | 'rtl'}) {
58 TestBed.configureTestingModule({
59 providers: [provideFakeDirectionality(opts?.textDirection ?? 'ltr')],
60 });
61 fixture = TestBed.createComponent(StandaloneMenuExample);
62 await fixture.whenStable();
63 getItem('Apple')?.focus();
64 }
65
66 function getMenu(): HTMLElement {
67 return fixture.debugElement.query(By.directive(Menu)).nativeElement as HTMLElement;

Callers 1

menu.spec.tsFile · 0.85

Calls 4

getMenuBarItemFunction · 0.85
getItemFunction · 0.70
focusMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…