I am running integration test in Angular App. I have Formcontrol element, this on selected should pass its value to a method in the backend. My question is how to pass the selected value to the method. I have given code snippet
drop down/form element choices header.id=User, [value]="username1" ,header.choices=["usename1","username2"] //this is the selected value, this is the value that must be passed
spec.ts
const choiceSelector=fixture.debugElement.query(By.css('.selectOption'));
******what should I write to pass the value from test*************
htmlcode
<mat-select [formControl]="header.selected" multiple class="selectOption" panelClass="something">
<mat-option *ngFor="let choice of header.choices" [value]="choice" class="selectOption"></mat-option>
Aucun commentaire:
Enregistrer un commentaire