Angular Material Design Mat-Select Unit Test

const debugElement = fixture.debugElement;
const matSelect = debugElement.query(By.css('.mat-select-trigger')).nativeElement;
matSelect.click();
fixture.detechChanges();
const matOption = debugElement.query(By.css('.mat-option'))[0].nativeElement;
matOption.click();
fixture.detechChanges();
fixture.whenStable().then( () => {
   const inputElement: HTMLElement = debugElement.query(By.css('.ask-input')).nativeElement;
   expect(inputElement.innerHTML.length).toBeGreaterThan(0);
});

Bu blogdaki popüler yayınlar

About Android padding, margin, width, height, wrap_content, match_parent, R Class

@SerializedName and @Expose annotations