mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 18:17:31 +08:00
42 lines
1001 B
JavaScript
42 lines
1001 B
JavaScript
const port = 3000;
|
|
|
|
describe('Overlays', () => {
|
|
it('should remove the overlay when going back to the previous route', () => {
|
|
// Requires navigation history to perform a pop
|
|
cy.visit(`http://localhost:${port}`);
|
|
cy.visit(`http://localhost:${port}/overlays`);
|
|
|
|
cy.get('#openModal').click();
|
|
|
|
cy.get('ion-modal').should('exist');
|
|
|
|
cy.get('#goBack').click();
|
|
|
|
cy.get('ion-modal').should('not.exist');
|
|
});
|
|
|
|
it('should remove the overlay when pushing to a new route', () => {
|
|
cy.visit(`http://localhost:${port}/overlays`);
|
|
|
|
cy.get('#openModal').click();
|
|
|
|
cy.get('ion-modal').should('exist');
|
|
|
|
cy.get('#push').click();
|
|
|
|
cy.get('ion-modal').should('not.exist');
|
|
});
|
|
|
|
it('should remove the overlay when replacing the route', () => {
|
|
cy.visit(`http://localhost:${port}/overlays`);
|
|
|
|
cy.get('#openModal').click();
|
|
|
|
cy.get('ion-modal').should('exist');
|
|
|
|
cy.get('#replace').click();
|
|
|
|
cy.get('ion-modal').should('not.exist');
|
|
});
|
|
});
|