mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
test(app): update cordova tests to show a content as the first-child
references #5934
This commit is contained in:
41
ionic/components/app/test/cordova/app.html
Normal file
41
ionic/components/app/test/cordova/app.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<ion-menu [content]="content" side="left">
|
||||
|
||||
<ion-toolbar secondary>
|
||||
<ion-title>Left Menu</ion-title>
|
||||
</ion-toolbar>
|
||||
|
||||
<ion-content>
|
||||
|
||||
<ion-list>
|
||||
<ion-list-header>
|
||||
Settings
|
||||
</ion-list-header>
|
||||
|
||||
<button ion-item menuClose detail-none>
|
||||
Close Menu
|
||||
</button>
|
||||
|
||||
</ion-list>
|
||||
</ion-content>
|
||||
|
||||
</ion-menu>
|
||||
|
||||
<ion-menu [content]="content" side="right">
|
||||
|
||||
<ion-content>
|
||||
|
||||
<ion-list>
|
||||
<ion-list-header>
|
||||
No toolbar
|
||||
</ion-list-header>
|
||||
|
||||
<button ion-item menuClose="right" detail-none>
|
||||
Close Menu
|
||||
</button>
|
||||
|
||||
</ion-list>
|
||||
</ion-content>
|
||||
|
||||
</ion-menu>
|
||||
|
||||
<ion-nav [root]="root" #content></ion-nav>
|
||||
@@ -12,7 +12,7 @@ import {App, NavController, Page, IonicApp, Modal} from 'ionic-angular';
|
||||
<button>
|
||||
<ion-icon name="funnel"></ion-icon>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
<ion-content>
|
||||
The modal should have status bar padding, too because it is a toolbar.
|
||||
@@ -38,6 +38,8 @@ class Page1 {
|
||||
templateUrl: 'page2.html'
|
||||
})
|
||||
class Page2 {
|
||||
page3 = Page3;
|
||||
|
||||
constructor(private nav: NavController) {
|
||||
|
||||
}
|
||||
@@ -49,8 +51,23 @@ class Page2 {
|
||||
}
|
||||
|
||||
|
||||
@Page({
|
||||
templateUrl: 'page3.html'
|
||||
})
|
||||
class Page3 {
|
||||
|
||||
constructor(private nav: NavController) {
|
||||
|
||||
}
|
||||
|
||||
goBack() {
|
||||
this.nav.pop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@App({
|
||||
template: `<ion-nav [root]="root"></ion-nav>`
|
||||
templateUrl: `./app.html`
|
||||
})
|
||||
class E2EApp {
|
||||
root = Page1;
|
||||
|
||||
@@ -8,9 +8,12 @@
|
||||
</button>
|
||||
<ion-buttons end>
|
||||
<button>
|
||||
<ion-icon name="funnel"></ion-icon>
|
||||
<ion-icon name="search"></ion-icon>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
<button menuToggle="right" right>
|
||||
<ion-icon name="menu"></ion-icon>
|
||||
</button>
|
||||
</ion-navbar>
|
||||
<ion-content padding>
|
||||
|
||||
|
||||
@@ -8,10 +8,14 @@
|
||||
<ion-icon name="funnel"></ion-icon>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
<button menuToggle="right" right>
|
||||
<ion-icon name="menu"></ion-icon>
|
||||
</button>
|
||||
</ion-navbar>
|
||||
|
||||
<ion-content padding>
|
||||
<h1>This is Page 2</h1>
|
||||
|
||||
<button (click)="openModal()" class="e2eCordovaOpenModal">Open Modal</button>
|
||||
<button [navPush]="page3">Go to Page 3</button>
|
||||
</ion-content>
|
||||
|
||||
6
ionic/components/app/test/cordova/page3.html
Normal file
6
ionic/components/app/test/cordova/page3.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<ion-content padding>
|
||||
<h1>This is Page 3</h1>
|
||||
<p>No navbar should still have space on the top for the status bar.</p>
|
||||
|
||||
<button (click)="goBack()">Go Back</button>
|
||||
</ion-content>
|
||||
Reference in New Issue
Block a user