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

Function grabElementsForTesting

src/cdk/menu/menu-bar.spec.ts:76–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74 let fileMenuNativeItems: HTMLButtonElement[];
75
76 function grabElementsForTesting() {
77 nativeMenuBar = fixture.componentInstance.nativeMenuBar.nativeElement;
78
79 nativeMenus = fixture.componentInstance.nativeMenus.map(e => e.nativeElement);
80
81 menuBarNativeItems = fixture.componentInstance.nativeItems
82 .map(e => e.nativeElement)
83 .slice(0, 2); // menu bar has the first 2 menu items
84
85 fileMenuNativeItems = fixture.componentInstance.nativeItems
86 .map(e => e.nativeElement)
87 .slice(2, 5); // file menu has the next 3 menu items
88 }
89
90 /** Run change detection and extract then set the rendered elements. */
91 function detectChanges() {

Callers 1

detectChangesFunction · 0.70

Calls 1

filterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…