MCPcopy Create free account
hub / github.com/angular/angular / selectOptionViaUI

Function selectOptionViaUI

packages/forms/test/value_accessor_integration_spec.ts:529–534  ·  view source on GitHub ↗
(valueString: string)

Source from the content-addressed store, hash-verified

527 };
528
529 const selectOptionViaUI = async (valueString: string): Promise<void> => {
530 const select = fixture.debugElement.query(By.css('select'));
531 select.nativeElement.value = valueString;
532 dispatchEvent(select.nativeElement, 'change');
533 await fixture.whenStable();
534 };
535
536 const assertOptionElementSelectedState = (selectedStates: boolean[]): void => {
537 const options = fixture.debugElement.queryAll(By.css('option'));

Calls 4

dispatchEventFunction · 0.90
cssMethod · 0.80
whenStableMethod · 0.65
queryMethod · 0.45

Tested by

no test coverage detected