Skip to content

Commit

Permalink
workaround for the '.clear' method in search e2e tests #1562
Browse files Browse the repository at this point in the history
  • Loading branch information
kaperoo committed Aug 31, 2023
1 parent eaa2310 commit d90ea52
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ describe('SearchBoxContainer Component', () => {
});

it('should display an error when an invalid end date is entered', () => {
cy.get('[aria-label="End date input"]').type('2009-13-01');
cy.get('[aria-label="End date input"]').type('2009-12-00');
cy.get('.MuiFormHelperText-root').contains('Date format: yyyy-MM-dd.');

cy.get('[aria-label="End date input"]').clear();
// cy.get('[aria-label="End date input"]').clear();
cy.get('[aria-label="End date input"]').type('{ctrl}a{backspace}');
cy.get('.MuiFormHelperText-root').should('not.exist');
cy.get('[aria-label="End date input"]').type('2009-02-30');
cy.get('[aria-label="End date input"]').type('0000-02-28');
cy.get('.MuiFormHelperText-root').contains('Date format: yyyy-MM-dd.');
});

Expand Down

0 comments on commit d90ea52

Please sign in to comment.