Skip to content

Commit

Permalink
Updated Form e2e test
Browse files Browse the repository at this point in the history
Added an assertion for the `Mui-error` class on the helper text
  • Loading branch information
rmanaem committed Feb 23, 2024
1 parent d8d4565 commit 45dc8fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cypress/e2e/Form.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ describe('App', () => {
cy.get('[data-cy="Minimum age-continuous-field"]').type('some text');
cy.get('[data-cy="Minimum age-continuous-field"] p')
.should('be.visible')
.should('contain', 'Please enter a valid number!');
.should('contain', 'Please enter a valid number!')
.should('have.class', 'Mui-error');
cy.get('[data-cy="submit-query-button"]').should('be.disabled');
cy.get('[data-cy="Minimum age-continuous-field"] input').clear();
cy.get('[data-cy="submit-query-button"]').should('not.be.disabled');
Expand Down

0 comments on commit 45dc8fd

Please sign in to comment.