mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
28 lines
925 B
TypeScript
28 lines
925 B
TypeScript
describe('IonActionSheet', () => {
|
|
beforeEach(() => {
|
|
cy.visit('/overlay-components/actionsheet');
|
|
});
|
|
|
|
it('display action sheet', () => {
|
|
//show action sheet
|
|
cy.get('ion-button').contains('Show ActionSheet').click();
|
|
cy.get('ion-action-sheet').contains('Action Sheet');
|
|
cy.get('ion-action-sheet').get('button').contains('Ok');
|
|
cy.get('ion-action-sheet').get('button').contains('Cancel');
|
|
|
|
//click ok
|
|
cy.get('ion-action-sheet').get('button:contains("Ok")').click();
|
|
cy.get('div').contains('Ok clicked');
|
|
cy.get('ion-action-sheet').should('not.exist');
|
|
});
|
|
|
|
it('display action and call dismiss to close it', () => {
|
|
//show action sheet
|
|
cy.get('ion-button').contains('Show ActionSheet, hide after 250 ms').click();
|
|
cy.get('ion-action-sheet').contains('Action Sheet');
|
|
|
|
//verify action sheet is gone
|
|
cy.get('ion-action-sheet').should('not.exist');
|
|
});
|
|
});
|