mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(modal): .ion-page element is now correctly added (#24811)
resolves #24809
This commit is contained in:
@@ -52,8 +52,8 @@ describe('Modals: Inline', () => {
|
||||
cy.get('ion-list ion-item').should('not.exist');
|
||||
});
|
||||
|
||||
it('should have items after 1500ms', () => {
|
||||
cy.wait(1500);
|
||||
it('should have items after opening', () => {
|
||||
cy.get('#open-modal').click();
|
||||
|
||||
cy.get('ion-list ion-item:nth-child(1)').should('have.text', 'A');
|
||||
cy.get('ion-list ion-item:nth-child(2)').should('have.text', 'B');
|
||||
@@ -61,7 +61,18 @@ describe('Modals: Inline', () => {
|
||||
cy.get('ion-list ion-item:nth-child(4)').should('have.text', 'D');
|
||||
});
|
||||
|
||||
it('should have a div with .ion-page', () => {
|
||||
it('should have a div with .ion-page after opening', () => {
|
||||
cy.get('#open-modal').click();
|
||||
|
||||
cy.get('ion-modal').children('.ion-page').should('exist');
|
||||
});
|
||||
|
||||
it('should remove .ion-page when closing the modal', () => {
|
||||
cy.get('#open-modal').click();
|
||||
|
||||
cy.get('ion-modal').children('.ion-page').should('exist');
|
||||
cy.get('ion-modal').trigger('click', 20, 20);
|
||||
|
||||
cy.get('ion-modal').children('.ion-page').should('not.exist');
|
||||
})
|
||||
});
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<ion-modal [isOpen]="true" [breakpoints]="[0.1, 0.5, 1]" [initialBreakpoint]="0.5">
|
||||
<ion-button id="open-modal">Open Modal</ion-button>
|
||||
|
||||
<ion-modal [animated]="false" trigger="open-modal" [breakpoints]="[0.1, 0.5, 1]" [initialBreakpoint]="0.5">
|
||||
<ng-template>
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
|
||||
Reference in New Issue
Block a user