Files
2021-10-12 15:10:03 -06:00

28 lines
809 B
TypeScript

describe('IonAlert', () => {
beforeEach(() => {
cy.visit('/overlay-components/alert');
});
it('display alert', () => {
//show alert
cy.get('ion-button').contains('Show Alert').click();
cy.get('ion-alert').contains('Alert');
cy.get('ion-alert').get('button').contains('Ok');
cy.get('ion-alert').get('button').contains('Cancel');
//click ok
cy.get('ion-alert').get('button:contains("Ok")').click();
cy.get('div').contains('Ok clicked');
cy.get('ion-alert').should('not.exist');
});
it('display alert and call dismiss to close it', () => {
//show alert
cy.get('ion-button').contains('Show Alert, hide after 250 ms').click();
cy.get('ion-alert').contains('Alert');
//verify alert is gone
cy.get('ion-alert').should('not.exist');
});
});