test(modal): make sure enableBackdropDismiss works correctly

references #9185
This commit is contained in:
Manu Mtz.-Almeida
2016-11-19 18:42:47 +01:00
parent 11bb8ac587
commit 9bb8e5ba5e
6 changed files with 25 additions and 5 deletions

View File

@@ -62,6 +62,10 @@ export class E2EPage {
this.platforms = platform.platforms();
}
push() {
this.navCtrl.push(E2EPage);
}
presentModal() {
let modal = this.modalCtrl.create(ModalPassData, { userId: 8675309 });
modal.present();
@@ -77,7 +81,9 @@ export class E2EPage {
}
presentModalChildNav() {
this.modalCtrl.create(ContactUs).present();
this.modalCtrl.create(ContactUs, null, {
enableBackdropDismiss: false
}).present();
}
presentToolbarModal() {

View File

@@ -2,6 +2,9 @@
<ion-navbar>
<ion-title>Modals</ion-title>
<ion-buttons end>
<button ion-button (click)="push()">Push</button>
</ion-buttons>
</ion-navbar>
</ion-header>
@@ -13,7 +16,10 @@
<button ion-button (click)="presentModal()">Present modal, pass params</button>
</p>
<p>
<button ion-button class="e2eOpenModal" (click)="presentModalChildNav()">Present modal w/ child ion-nav</button>
<button ion-button class="e2eOpenModal" (click)="presentModalChildNav()">
Present modal w/ child ion-nav
<span style="font-size:0.5em; text-transform: none"> (enableBackdropDismiss: false)</span>
</button>
</p>
<p>
<button ion-button class="e2eOpenToolbarModal" (click)="presentToolbarModal()">Present modal w/ toolbar (and alert)</button>