diff --git a/ionic/components/app/test/cordova/e2e.ts b/ionic/components/app/test/cordova/e2e.ts new file mode 100644 index 0000000000..c39673ffd6 --- /dev/null +++ b/ionic/components/app/test/cordova/e2e.ts @@ -0,0 +1,8 @@ + +it('should navigate to page 2', function() { + element(by.css('.e2eCordovaPage2')).click(); +}); + +it('should open modal', function() { + element(by.css('.e2eCordovaOpenModal')).click(); +}); diff --git a/ionic/components/app/test/cordova/index.ts b/ionic/components/app/test/cordova/index.ts new file mode 100644 index 0000000000..15036a48b6 --- /dev/null +++ b/ionic/components/app/test/cordova/index.ts @@ -0,0 +1,62 @@ +import {App, NavController, Page, IonicApp, Modal} from 'ionic-angular'; + + +@Page({ + template: ` + + This is a modal + + + + + + + The modal should have status bar padding, too because it is a toolbar. + + + ` +}) +class MyModal { + +} + + +@Page({ + templateUrl: 'page1.html' +}) +class Page1 { + page2 = Page2; + sort: string = 'all'; +} + + +@Page({ + templateUrl: 'page2.html' +}) +class Page2 { + constructor(private nav: NavController) { + + } + + openModal() { + let modal = Modal.create(MyModal); + this.nav.present(modal); + } +} + + +@App({ + template: `` +}) +class E2EApp { + root = Page1; +} + +// Add platform cordova and platform ios so the status bar +// padding will get added for each mode +document.body.classList.add('platform-cordova'); +document.body.classList.add('platform-ios'); diff --git a/ionic/components/app/test/cordova/page1.html b/ionic/components/app/test/cordova/page1.html new file mode 100644 index 0000000000..5c72ed13ca --- /dev/null +++ b/ionic/components/app/test/cordova/page1.html @@ -0,0 +1,23 @@ + + + All + Favorites + + + + + + + + +

+ The platform-ios and platform-cordova class is added to the body of this test. + This is to simulate how each mode will look on iOS with the iOS status bar padding. +

+ + +
diff --git a/ionic/components/app/test/cordova/page2.html b/ionic/components/app/test/cordova/page2.html new file mode 100644 index 0000000000..6b58884015 --- /dev/null +++ b/ionic/components/app/test/cordova/page2.html @@ -0,0 +1,17 @@ + + Page 2 + + + + + + + +

This is Page 2

+ + +