test(modal): update modal test to add new buttons and move toast

This commit is contained in:
Brandy Carney
2016-11-03 16:27:30 -04:00
parent a1e17c6f78
commit e7ad038b4d
3 changed files with 25 additions and 11 deletions

View File

@@ -77,6 +77,22 @@ export class E2EPage {
}
presentModalChildNav() {
this.modalCtrl.create(ContactUs).present();
}
presentToolbarModal() {
this.modalCtrl.create(ToolbarModal).present();
}
presentModalWithInputs() {
let modal = this.modalCtrl.create(ModalWithInputs);
modal.onDidDismiss((data: any) => {
console.log('Modal with inputs data:', data);
});
modal.present();
}
presentNavModalWithToast() {
this.toastCtrl.create({
message: 'Will present a modal with child nav...',
duration: 1000,
@@ -87,7 +103,7 @@ export class E2EPage {
}, 500);
}
presentToolbarModal() {
presentToolbarModalWithToast() {
this.toastCtrl.create({
message: 'Will present a modal with toolbars...',
duration: 1000,
@@ -98,14 +114,6 @@ export class E2EPage {
}, 500);
}
presentModalWithInputs() {
let modal = this.modalCtrl.create(ModalWithInputs);
modal.onDidDismiss((data: any) => {
console.log('Modal with inputs data:', data);
});
modal.present();
}
ionViewDidLoad() {
console.log('E2EPage ionViewDidLoad fired');
}

View File

@@ -4,7 +4,7 @@ it('should open modal', function() {
});
it('should close alert with button click', function() {
element(by.css('.alert-button:last-child')).click();
element(by.css('.alert-button')).click();
});
it('should close with close button click', function() {
@@ -16,7 +16,7 @@ it('should open toolbar modal', function() {
});
it('should close alert with button click', function() {
element(by.css('.alert-button:last-child')).click();
element(by.css('.alert-button')).click();
});
it('should close toolbar modal', function() {

View File

@@ -21,6 +21,12 @@
<p>
<button ion-button (click)="presentModalWithInputs()">Present modal w/ inputs</button>
</p>
<p>
<button ion-button (click)="presentNavModalWithToast()">Present toast then child ion-nav modal</button>
</p>
<p>
<button ion-button (click)="presentToolbarModalWithToast()">Present toast then toolbar modal</button>
</p>
<p>
{{platforms | json}}
</p>