test(e2e): refactor e2e to use deeplink decorator, lazy load more pages

This commit is contained in:
Dan Bucholtz
2017-03-11 00:15:38 -06:00
committed by GitHub
parent 3118bbbd1b
commit 0964c850d4
290 changed files with 2083 additions and 1865 deletions

View File

@@ -1,8 +1,9 @@
import { Component } from '@angular/core';
import { PageOne } from '../pages/page-one/page-one';
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class E2EApp {
root = 'E2EPage';
export class AppComponent {
root = PageOne;
}

View File

@@ -2,23 +2,18 @@ import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../..';
import { E2EApp } from './app.component';
import { AppComponent } from './app.component';
import { PageOneModule } from '../pages/page-one/page-one.module';
@NgModule({
declarations: [
E2EApp
AppComponent
],
imports: [
BrowserModule,
IonicModule.forRoot(E2EApp, {}, {
links: [
{ loadChildren: '../pages/main/main.module#E2EPageModule', name: 'E2EPage' },
]
})
IonicModule.forRoot(AppComponent, {}),
PageOneModule
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp
]
})
export class AppModule {}

View File

@@ -1,17 +0,0 @@
import { NgModule } from '@angular/core';
import { DeepLinkModule } from '../../../../../..';
import { E2EPage } from './main';
@NgModule({
declarations: [
E2EPage,
],
imports: [
DeepLinkModule.forChild(E2EPage)
],
entryComponents: [
E2EPage,
]
})
export class E2EPageModule {}

View File

@@ -0,0 +1,14 @@
import { NgModule } from '@angular/core';
import { DeepLinkModule } from '../../../../../..';
import { PageOne } from './page-one';
@NgModule({
declarations: [
PageOne,
],
imports: [
DeepLinkModule.forChild(PageOne)
]
})
export class PageOneModule {}

View File

@@ -1,12 +1,13 @@
import { Component, ViewEncapsulation } from '@angular/core';
import { NavController, PickerController } from '../../../../../..';
import { DeepLink, NavController, PickerController } from '../../../../../..';
@DeepLink()
@Component({
templateUrl: 'main.html',
templateUrl: 'page-one.html',
encapsulation: ViewEncapsulation.None,
})
export class E2EPage {
export class PageOne {
smoothie: string;
timer: string;
@@ -16,7 +17,7 @@ export class E2EPage {
) { }
push() {
this.navCtrl.push(E2EPage);
this.navCtrl.push(PageOne);
}
twoColumns() {