I'm trying to test a similar form (in component testing mode):
<form [formGroup]="queryForm" (ngSubmit)="onSubmit()">
<input formControlName="query"/>
<button [disabled]="!queryForm.valid"/>
</form>
with the test code:
cy.get('@query').type(queryString, { delay: 50});
cy.get('@submit').should('be.enabled').click();
The button works as expected in normal application, but inside Cypress it stays disabled after typing. How can I fix this? My guess was that the change detection wasn't triggered, but I don't know how to trigger it.