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

Function grabElementsForTesting

src/cdk/menu/menu.spec.ts:140–154  ·  view source on GitHub ↗

Get the test elements from the component.

()

Source from the content-addressed store, hash-verified

138
139 /** Get the test elements from the component. */
140 function grabElementsForTesting() {
141 nativeFileTrigger = fixture.componentInstance.nativeFileTrigger?.nativeElement;
142 nativeFileButtons = fixture.debugElement
143 .query(By.css('#file_menu'))
144 ?.nativeElement.querySelectorAll('button');
145
146 nativeEditTrigger = fixture.componentInstance.nativeEditTrigger?.nativeElement;
147 nativeEditButtons = fixture.debugElement
148 .query(By.css('#edit_menu'))
149 ?.nativeElement.querySelectorAll('button');
150
151 nativeShareTrigger = fixture.componentInstance.nativeShareTrigger?.nativeElement;
152
153 nativeMenus = fixture.componentInstance.menus.map(m => m.nativeElement);
154 }
155
156 /** Run change detection and extract the set of rendered elements. */
157 function detectChanges() {

Callers 1

detectChangesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected