mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(e2e): update tests to remove component name strings
This commit is contained in:
@ -183,9 +183,7 @@ export function runAppScripts(folderInfo: any, sassConfigPath: string, appEntryP
|
||||
let tsConfig = distDir + 'tsconfig.json';
|
||||
let scriptArgs = [
|
||||
'build',
|
||||
'--aot',
|
||||
'--minifyCss',
|
||||
'--optimizeJs',
|
||||
'--prod',
|
||||
'--sass', sassConfigPath,
|
||||
'--appEntryPoint', appEntryPoint,
|
||||
'--srcDir', distDir,
|
||||
|
@ -62,9 +62,9 @@ export class MyCmpTest {
|
||||
<ion-label>Text Input</ion-label>
|
||||
<ion-textarea></ion-textarea>
|
||||
</ion-item>
|
||||
<button ion-item navPush="FullPage">Push FullPage w/ navPush="FullPage"</button>
|
||||
<button ion-item [navPush]="pushPage">Push FullPage w/ [navPush]="pushPage"</button>
|
||||
<button ion-item [navPush]="pushPage" [navParams]="{id:40}">Push w/ [navPush] and [navParams]</button>
|
||||
<button ion-item [navPush]="'FirstPage'">Push w/ [navPush] and string view name</button>
|
||||
<button ion-item [navPush]="firstPage">Push w/ [navPush] and firstPage</button>
|
||||
<button ion-item (click)="setPages()">setPages() (Go to PrimaryHeaderPage)</button>
|
||||
<button ion-item (click)="setRoot()">setRoot(PrimaryHeaderPage) (Go to PrimaryHeaderPage)</button>
|
||||
<button ion-item (click)="pop()">Pop</button>
|
||||
@ -84,6 +84,7 @@ export class MyCmpTest {
|
||||
})
|
||||
export class FirstPage {
|
||||
pushPage = FullPage;
|
||||
firstPage = FirstPage;
|
||||
title = 'First Page';
|
||||
pages: Array<number> = [];
|
||||
@ViewChild(Content) content: Content;
|
||||
|
@ -1,12 +1,14 @@
|
||||
import { Component, NgModule, ViewChild } from '@angular/core';
|
||||
import { /*DeepLink,*/AlertController, DeepLinkConfig, IonicApp, IonicModule, App, NavController, NavParams, ModalController, ViewController, Tabs, Tab } from '../../../../../ionic-angular';
|
||||
import { AlertController, DeepLinkConfig, IonicApp, IonicModule, App, NavController, NavParams, ModalController, ViewController, Tabs, Tab } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
// @DeepLink({ name: 'sign-in' })
|
||||
@Component({
|
||||
templateUrl: './signIn.html'
|
||||
})
|
||||
export class SignIn {}
|
||||
export class SignIn {
|
||||
tabsPage = TabsPage;
|
||||
}
|
||||
|
||||
|
||||
@Component({
|
||||
@ -32,6 +34,9 @@ export class ChatPage {
|
||||
})
|
||||
export class TabsPage {
|
||||
showTab: boolean = false;
|
||||
rootPage1 = Tab1Page1;
|
||||
rootPage2 = Tab2Page1;
|
||||
rootPage3 = Tab3Page1;
|
||||
|
||||
@ViewChild(Tabs) tabs: Tabs;
|
||||
|
||||
@ -125,6 +130,7 @@ export class TabsPage {
|
||||
templateUrl: './tab1page1.html'
|
||||
})
|
||||
export class Tab1Page1 {
|
||||
tab1Page2 = Tab1Page2;
|
||||
color: boolean;
|
||||
userId: string;
|
||||
|
||||
@ -176,6 +182,8 @@ export class Tab1Page1 {
|
||||
templateUrl: './tab1page2.html'
|
||||
})
|
||||
export class Tab1Page2 {
|
||||
tab1Page3 = Tab1Page3;
|
||||
|
||||
constructor(public tabs: Tabs) { }
|
||||
|
||||
favoritesTab() {
|
||||
@ -243,6 +251,7 @@ export class Tab1Page3 {
|
||||
templateUrl: './tab2page1.html'
|
||||
})
|
||||
export class Tab2Page1 {
|
||||
tab2Page2 = Tab2Page2;
|
||||
|
||||
ionViewWillEnter() {
|
||||
console.log('Tab2Page1, ionViewWillEnter');
|
||||
@ -271,6 +280,7 @@ export class Tab2Page1 {
|
||||
templateUrl: './tab2page2.html'
|
||||
})
|
||||
export class Tab2Page2 {
|
||||
tab2Page3 = Tab2Page3;
|
||||
|
||||
ionViewWillEnter() {
|
||||
console.log('Tab2Page2, ionViewWillEnter');
|
||||
|
@ -19,12 +19,12 @@
|
||||
<ion-input type="password"></ion-input>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<a ion-button block navPush="TabsPage" class="e2eSignIn">Sign In</a>
|
||||
<a ion-button block [navPush]="tabsPage" class="e2eSignIn">Sign In</a>
|
||||
</ion-item>
|
||||
</ion-card>
|
||||
|
||||
<p style="text-align: center;">
|
||||
<a navPush="TabsPage">View Tabs Page</a>
|
||||
<a [navPush]="tabsPage">View Tabs Page</a>
|
||||
</p>
|
||||
|
||||
</ion-content>
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<p><button ion-button class="e2eGoToTab1Page2" navPush="Tab1Page2">Go to Tab 1, Page 2</button></p>
|
||||
<p><button ion-button class="e2eGoToTab1Page2" [navPush]="tab1Page2">Go to Tab 1, Page 2</button></p>
|
||||
<p><button ion-button (click)="logout()">Logout</button></p>
|
||||
<p><button ion-button (click)="favoritesTab()">Favorites Tab</button></p>
|
||||
<p><button ion-button (click)="goBack()">Go Back</button></p>
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<p><button ion-button navPush="Tab1Page3">Go to Tab 1, Page 3</button></p>
|
||||
<p><button ion-button [navPush]="tab1Page3">Go to Tab 1, Page 3</button></p>
|
||||
<p><button ion-button (click)="favoritesTab()">Favorites Tab</button></p>
|
||||
<p><button ion-button class="e2eBackToTab1Page1" navPop>Back to Tab 1, Page 1</button></p>
|
||||
<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>
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<p><button ion-button navPush="Tab2Page2">Go to Tab 2, Page 2</button></p>
|
||||
<p><button ion-button [navPush]="tab2Page2">Go to Tab 2, Page 2</button></p>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<p><button ion-button navPush="Tab2Page3">Go to Tab 2, Page 3 (no navbar)</button></p>
|
||||
<p><button ion-button [navPush]="tab2Page3">Go to Tab 2, Page 3 (no navbar)</button></p>
|
||||
<p><button ion-button navPop>Back to Tab 2, Page 1</button></p>
|
||||
<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>
|
||||
<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>
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
<ion-tabs preloadTabs="false" (ionChange)="onTabChange($event)">
|
||||
<ion-tab tabTitle="Recents" tabIcon="call" root="Tab1Page1" swipeBackEnabled="true"></ion-tab>
|
||||
<ion-tab tabTitle="Favorites" tabIcon="star" root="Tab2Page1" tabsHideOnSubPages="false"></ion-tab>
|
||||
<ion-tab tabTitle="Settings" tabIcon="settings" root="Tab3Page1"></ion-tab>
|
||||
<ion-tab tabTitle="Recents" tabIcon="call" [root]="rootPage1" swipeBackEnabled="true"></ion-tab>
|
||||
<ion-tab tabTitle="Favorites" tabIcon="star" [root]="rootPage2" tabsHideOnSubPages="false"></ion-tab>
|
||||
<ion-tab tabTitle="Settings" tabIcon="settings" [root]="rootPage3"></ion-tab>
|
||||
<ion-tab tabTitle="Chat" tabIcon="chatbubbles" (ionSelect)="chat()" [show]="showTab"></ion-tab>
|
||||
<ion-tab tabTitle="Logout" tabIcon="exit" (ionSelect)="logout()"></ion-tab>
|
||||
</ion-tabs>
|
||||
|
Reference in New Issue
Block a user