-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(): merge feature-6.2 into main
chore(): merge feature-6.2 into main
- Loading branch information
Showing
394 changed files
with
5,586 additions
and
610 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
angular/test/test-app/e2e/src/keep-contents-mounted.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
describe('overlays - keepContentsMounted', () => { | ||
describe('modal', () => { | ||
it('should not mount component if false', () => { | ||
cy.visit('/modal-inline'); | ||
|
||
cy.get('ion-modal ion-content').should('not.exist'); | ||
}); | ||
|
||
it('should mount component if true', () => { | ||
cy.visit('/keep-contents-mounted'); | ||
|
||
cy.get('ion-modal ion-content').should('exist'); | ||
}); | ||
|
||
it('should keep component mounted after dismissing if true', () => { | ||
cy.visit('/keep-contents-mounted'); | ||
|
||
cy.get('#open-modal').click(); | ||
|
||
cy.get('ion-modal ion-content').should('exist'); | ||
|
||
cy.get('ion-modal ion-button').click(); | ||
|
||
cy.get('ion-modal') | ||
.should('not.be.visible') | ||
.should('have.class', 'overlay-hidden'); | ||
|
||
cy.get('ion-modal ion-content').should('exist'); | ||
}); | ||
}) | ||
describe('popover', () => { | ||
it('should not mount component if false', () => { | ||
cy.visit('/popover-inline'); | ||
|
||
cy.get('ion-popover ion-content').should('not.exist'); | ||
}); | ||
|
||
it('should mount component if true', () => { | ||
cy.visit('/keep-contents-mounted'); | ||
|
||
cy.get('ion-popover ion-content').should('exist'); | ||
}); | ||
|
||
it('should keep component mounted after dismissing if true', () => { | ||
cy.visit('/keep-contents-mounted'); | ||
|
||
cy.get('#open-popover').click(); | ||
|
||
cy.get('ion-popover ion-content').should('exist'); | ||
|
||
cy.get('ion-popover ion-button').click(); | ||
|
||
cy.get('ion-popover') | ||
.should('not.be.visible') | ||
.should('have.class', 'overlay-hidden'); | ||
|
||
cy.get('ion-popover ion-content').should('exist'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './keep-contents-mounted.component'; | ||
export * from './keep-contents-mounted.module'; |
16 changes: 16 additions & 0 deletions
16
angular/test/test-app/src/app/keep-contents-mounted/keep-contents-mounted-routing.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { NgModule } from "@angular/core"; | ||
import { RouterModule } from "@angular/router"; | ||
import { OverlayKeepContentsMounted } from "."; | ||
|
||
@NgModule({ | ||
imports: [ | ||
RouterModule.forChild([ | ||
{ | ||
path: '', | ||
component: OverlayKeepContentsMounted | ||
} | ||
]) | ||
], | ||
exports: [RouterModule] | ||
}) | ||
export class OverlayKeepContentsMountedRoutingModule { } |
22 changes: 22 additions & 0 deletions
22
angular/test/test-app/src/app/keep-contents-mounted/keep-contents-mounted.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<ion-content> | ||
<ion-button id="open-modal" (click)="modal.present()">Open Modal</ion-button> | ||
<ion-button id="open-popover" (click)="popover.present()">Open Popover</ion-button> | ||
|
||
<ion-modal [keepContentsMounted]="true" #modal> | ||
<ng-template> | ||
<ion-content> | ||
<ion-button (click)="modal.dismiss()">Dismiss</ion-button> | ||
Modal Content | ||
</ion-content> | ||
</ng-template> | ||
</ion-modal> | ||
|
||
<ion-popover [keepContentsMounted]="true" #popover> | ||
<ng-template> | ||
<ion-content> | ||
<ion-button (click)="popover.dismiss()">Dismiss</ion-button> | ||
Popover Content | ||
</ion-content> | ||
</ng-template> | ||
</ion-popover> | ||
</ion-content> |
13 changes: 13 additions & 0 deletions
13
angular/test/test-app/src/app/keep-contents-mounted/keep-contents-mounted.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Component } from "@angular/core"; | ||
|
||
/** | ||
* Validates that inline modals correctly mount | ||
* inner components when keepContentsMounted is | ||
* enabled. | ||
*/ | ||
@Component({ | ||
selector: 'app-keep-contents-mounted', | ||
templateUrl: 'keep-contents-mounted.component.html' | ||
}) | ||
export class OverlayKeepContentsMounted { | ||
} |
12 changes: 12 additions & 0 deletions
12
angular/test/test-app/src/app/keep-contents-mounted/keep-contents-mounted.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { CommonModule } from "@angular/common"; | ||
import { NgModule } from "@angular/core"; | ||
import { IonicModule } from "@ionic/angular"; | ||
import { OverlayKeepContentsMountedRoutingModule } from "./keep-contents-mounted-routing.module"; | ||
import { OverlayKeepContentsMounted } from "./keep-contents-mounted.component"; | ||
|
||
@NgModule({ | ||
imports: [CommonModule, IonicModule, OverlayKeepContentsMountedRoutingModule], | ||
declarations: [OverlayKeepContentsMounted], | ||
exports: [OverlayKeepContentsMounted] | ||
}) | ||
export class OverlayAutoMountModule { } |
4 changes: 3 additions & 1 deletion
4
angular/test/test-app/src/app/popover-inline/popover-inline.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.