Skip to content

Commit 3cf4e52

Browse files
committed
test(app): update cordova tests to show a content as the first-child
references #5934
1 parent b52700b commit 3cf4e52

File tree

5 files changed

+74
-3
lines changed

5 files changed

+74
-3
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<ion-menu [content]="content" side="left">
2+
3+
<ion-toolbar secondary>
4+
<ion-title>Left Menu</ion-title>
5+
</ion-toolbar>
6+
7+
<ion-content>
8+
9+
<ion-list>
10+
<ion-list-header>
11+
Settings
12+
</ion-list-header>
13+
14+
<button ion-item menuClose detail-none>
15+
Close Menu
16+
</button>
17+
18+
</ion-list>
19+
</ion-content>
20+
21+
</ion-menu>
22+
23+
<ion-menu [content]="content" side="right">
24+
25+
<ion-content>
26+
27+
<ion-list>
28+
<ion-list-header>
29+
No toolbar
30+
</ion-list-header>
31+
32+
<button ion-item menuClose="right" detail-none>
33+
Close Menu
34+
</button>
35+
36+
</ion-list>
37+
</ion-content>
38+
39+
</ion-menu>
40+
41+
<ion-nav [root]="root" #content></ion-nav>

ionic/components/app/test/cordova/index.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {App, NavController, Page, IonicApp, Modal} from 'ionic-angular';
1212
<button>
1313
<ion-icon name="funnel"></ion-icon>
1414
</button>
15-
</ion-buttons>
15+
</ion-buttons>
1616
</ion-toolbar>
1717
<ion-content>
1818
The modal should have status bar padding, too because it is a toolbar.
@@ -38,6 +38,8 @@ class Page1 {
3838
templateUrl: 'page2.html'
3939
})
4040
class Page2 {
41+
page3 = Page3;
42+
4143
constructor(private nav: NavController) {
4244

4345
}
@@ -49,8 +51,23 @@ class Page2 {
4951
}
5052

5153

54+
@Page({
55+
templateUrl: 'page3.html'
56+
})
57+
class Page3 {
58+
59+
constructor(private nav: NavController) {
60+
61+
}
62+
63+
goBack() {
64+
this.nav.pop();
65+
}
66+
}
67+
68+
5269
@App({
53-
template: `<ion-nav [root]="root"></ion-nav>`
70+
templateUrl: `./app.html`
5471
})
5572
class E2EApp {
5673
root = Page1;

ionic/components/app/test/cordova/page1.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@
88
</button>
99
<ion-buttons end>
1010
<button>
11-
<ion-icon name="funnel"></ion-icon>
11+
<ion-icon name="search"></ion-icon>
1212
</button>
1313
</ion-buttons>
14+
<button menuToggle="right" right>
15+
<ion-icon name="menu"></ion-icon>
16+
</button>
1417
</ion-navbar>
1518
<ion-content padding>
1619

ionic/components/app/test/cordova/page2.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@
88
<ion-icon name="funnel"></ion-icon>
99
</button>
1010
</ion-buttons>
11+
<button menuToggle="right" right>
12+
<ion-icon name="menu"></ion-icon>
13+
</button>
1114
</ion-navbar>
1215

1316
<ion-content padding>
1417
<h1>This is Page 2</h1>
1518

1619
<button (click)="openModal()" class="e2eCordovaOpenModal">Open Modal</button>
20+
<button [navPush]="page3">Go to Page 3</button>
1721
</ion-content>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<ion-content padding>
2+
<h1>This is Page 3</h1>
3+
<p>No navbar should still have space on the top for the status bar.</p>
4+
5+
<button (click)="goBack()">Go Back</button>
6+
</ion-content>

0 commit comments

Comments
 (0)