test(react): add react e2e app

This commit is contained in:
Ely Lucas
2021-10-12 15:10:03 -06:00
committed by GitHub
parent 4075ea6941
commit ea34e50430
78 changed files with 65859 additions and 18670 deletions

View File

@ -0,0 +1,27 @@
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');
});
});