Skip to content

Commit 091545e

Browse files
committed
chore(e2e): update tests to remove component name strings
1 parent c492e71 commit 091545e

File tree

9 files changed

+25
-16
lines changed

9 files changed

+25
-16
lines changed

scripts/gulp/util.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,7 @@ export function runAppScripts(folderInfo: any, sassConfigPath: string, appEntryP
183183
let tsConfig = distDir + 'tsconfig.json';
184184
let scriptArgs = [
185185
'build',
186-
'--aot',
187-
'--minifyCss',
188-
'--optimizeJs',
186+
'--prod',
189187
'--sass', sassConfigPath,
190188
'--appEntryPoint', appEntryPoint,
191189
'--srcDir', distDir,

src/components/nav/test/basic/app.module.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ export class MyCmpTest {
6262
<ion-label>Text Input</ion-label>
6363
<ion-textarea></ion-textarea>
6464
</ion-item>
65-
<button ion-item navPush="FullPage">Push FullPage w/ navPush="FullPage"</button>
65+
<button ion-item [navPush]="pushPage">Push FullPage w/ [navPush]="pushPage"</button>
6666
<button ion-item [navPush]="pushPage" [navParams]="{id:40}">Push w/ [navPush] and [navParams]</button>
67-
<button ion-item [navPush]="'FirstPage'">Push w/ [navPush] and string view name</button>
67+
<button ion-item [navPush]="firstPage">Push w/ [navPush] and firstPage</button>
6868
<button ion-item (click)="setPages()">setPages() (Go to PrimaryHeaderPage)</button>
6969
<button ion-item (click)="setRoot()">setRoot(PrimaryHeaderPage) (Go to PrimaryHeaderPage)</button>
7070
<button ion-item (click)="pop()">Pop</button>
@@ -84,6 +84,7 @@ export class MyCmpTest {
8484
})
8585
export class FirstPage {
8686
pushPage = FullPage;
87+
firstPage = FirstPage;
8788
title = 'First Page';
8889
pages: Array<number> = [];
8990
@ViewChild(Content) content: Content;

src/components/tabs/test/advanced/app.module.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { Component, NgModule, ViewChild } from '@angular/core';
2-
import { /*DeepLink,*/AlertController, DeepLinkConfig, IonicApp, IonicModule, App, NavController, NavParams, ModalController, ViewController, Tabs, Tab } from '../../../../../ionic-angular';
2+
import { AlertController, DeepLinkConfig, IonicApp, IonicModule, App, NavController, NavParams, ModalController, ViewController, Tabs, Tab } from '../../../../../ionic-angular';
33

44

55
// @DeepLink({ name: 'sign-in' })
66
@Component({
77
templateUrl: './signIn.html'
88
})
9-
export class SignIn {}
9+
export class SignIn {
10+
tabsPage = TabsPage;
11+
}
1012

1113

1214
@Component({
@@ -32,6 +34,9 @@ export class ChatPage {
3234
})
3335
export class TabsPage {
3436
showTab: boolean = false;
37+
rootPage1 = Tab1Page1;
38+
rootPage2 = Tab2Page1;
39+
rootPage3 = Tab3Page1;
3540

3641
@ViewChild(Tabs) tabs: Tabs;
3742

@@ -125,6 +130,7 @@ export class TabsPage {
125130
templateUrl: './tab1page1.html'
126131
})
127132
export class Tab1Page1 {
133+
tab1Page2 = Tab1Page2;
128134
color: boolean;
129135
userId: string;
130136

@@ -176,6 +182,8 @@ export class Tab1Page1 {
176182
templateUrl: './tab1page2.html'
177183
})
178184
export class Tab1Page2 {
185+
tab1Page3 = Tab1Page3;
186+
179187
constructor(public tabs: Tabs) { }
180188

181189
favoritesTab() {
@@ -243,6 +251,7 @@ export class Tab1Page3 {
243251
templateUrl: './tab2page1.html'
244252
})
245253
export class Tab2Page1 {
254+
tab2Page2 = Tab2Page2;
246255

247256
ionViewWillEnter() {
248257
console.log('Tab2Page1, ionViewWillEnter');
@@ -271,6 +280,7 @@ export class Tab2Page1 {
271280
templateUrl: './tab2page2.html'
272281
})
273282
export class Tab2Page2 {
283+
tab2Page3 = Tab2Page3;
274284

275285
ionViewWillEnter() {
276286
console.log('Tab2Page2, ionViewWillEnter');

src/components/tabs/test/advanced/signIn.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
<ion-input type="password"></ion-input>
2020
</ion-item>
2121
<ion-item>
22-
<a ion-button block navPush="TabsPage" class="e2eSignIn">Sign In</a>
22+
<a ion-button block [navPush]="tabsPage" class="e2eSignIn">Sign In</a>
2323
</ion-item>
2424
</ion-card>
2525

2626
<p style="text-align: center;">
27-
<a navPush="TabsPage">View Tabs Page</a>
27+
<a [navPush]="tabsPage">View Tabs Page</a>
2828
</p>
2929

3030
</ion-content>

src/components/tabs/test/advanced/tab1page1.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<ion-content padding>
1111

12-
<p><button ion-button class="e2eGoToTab1Page2" navPush="Tab1Page2">Go to Tab 1, Page 2</button></p>
12+
<p><button ion-button class="e2eGoToTab1Page2" [navPush]="tab1Page2">Go to Tab 1, Page 2</button></p>
1313
<p><button ion-button (click)="logout()">Logout</button></p>
1414
<p><button ion-button (click)="favoritesTab()">Favorites Tab</button></p>
1515
<p><button ion-button (click)="goBack()">Go Back</button></p>

src/components/tabs/test/advanced/tab1page2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<ion-content padding>
1111

12-
<p><button ion-button navPush="Tab1Page3">Go to Tab 1, Page 3</button></p>
12+
<p><button ion-button [navPush]="tab1Page3">Go to Tab 1, Page 3</button></p>
1313
<p><button ion-button (click)="favoritesTab()">Favorites Tab</button></p>
1414
<p><button ion-button class="e2eBackToTab1Page1" navPop>Back to Tab 1, Page 1</button></p>
1515
<div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div>

src/components/tabs/test/advanced/tab2page1.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<ion-content padding>
1111

12-
<p><button ion-button navPush="Tab2Page2">Go to Tab 2, Page 2</button></p>
12+
<p><button ion-button [navPush]="tab2Page2">Go to Tab 2, Page 2</button></p>
1313
<div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div>
1414
<div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div>
1515

src/components/tabs/test/advanced/tab2page2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<ion-content padding>
1111

12-
<p><button ion-button navPush="Tab2Page3">Go to Tab 2, Page 3 (no navbar)</button></p>
12+
<p><button ion-button [navPush]="tab2Page3">Go to Tab 2, Page 3 (no navbar)</button></p>
1313
<p><button ion-button navPop>Back to Tab 2, Page 1</button></p>
1414
<div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div>
1515
<div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div><div f></div>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
<ion-tabs preloadTabs="false" (ionChange)="onTabChange($event)">
3-
<ion-tab tabTitle="Recents" tabIcon="call" root="Tab1Page1" swipeBackEnabled="true"></ion-tab>
4-
<ion-tab tabTitle="Favorites" tabIcon="star" root="Tab2Page1" tabsHideOnSubPages="false"></ion-tab>
5-
<ion-tab tabTitle="Settings" tabIcon="settings" root="Tab3Page1"></ion-tab>
3+
<ion-tab tabTitle="Recents" tabIcon="call" [root]="rootPage1" swipeBackEnabled="true"></ion-tab>
4+
<ion-tab tabTitle="Favorites" tabIcon="star" [root]="rootPage2" tabsHideOnSubPages="false"></ion-tab>
5+
<ion-tab tabTitle="Settings" tabIcon="settings" [root]="rootPage3"></ion-tab>
66
<ion-tab tabTitle="Chat" tabIcon="chatbubbles" (ionSelect)="chat()" [show]="showTab"></ion-tab>
77
<ion-tab tabTitle="Logout" tabIcon="exit" (ionSelect)="logout()"></ion-tab>
88
</ion-tabs>

0 commit comments

Comments
 (0)