test(e2e): refactor e2e tests to modular structure and utilize lazy loading where possible

refactor e2e tests to modular structure and utilize lazy loading where possible
This commit is contained in:
Dan Bucholtz
2017-03-02 14:37:01 -06:00
parent 0d32e5e791
commit be79382386
638 changed files with 5725 additions and 3710 deletions

View File

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';
import { RootPage } from '../pages/root-page/root-page';
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class AppComponent {
root = RootPage;
}

View File

@@ -0,0 +1,22 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../..';
import { AppComponent } from './app.component';
import { RootPage } from '../pages/root-page/root-page';
@NgModule({
declarations: [
AppComponent,
RootPage
],
imports: [
BrowserModule,
IonicModule.forRoot(AppComponent)
],
bootstrap: [IonicApp],
entryComponents: [
RootPage
]
})
export class AppModule {}

View File

@@ -0,0 +1,5 @@
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
platformBrowserDynamic().bootstrapModule(AppModule);

View File

@@ -1,3 +1,4 @@
import { by, element } from 'protractor';
it('should check apple, enable/check grape, submit form', function() {
element(by.css('[formControlName=apple]')).click();

View File

@@ -1,12 +1,13 @@
import { Component, NgModule } from '@angular/core';
import { Component } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { IonicApp, IonicModule, Checkbox } from '../../../../../ionic-angular';
import { Checkbox } from '../../../../../../';
@Component({
templateUrl: 'main.html'
templateUrl: 'root-page.html'
})
export class E2EPage {
export class RootPage {
grapeDisabled: boolean;
grapeChecked: boolean;
kiwiValue: boolean;
@@ -59,26 +60,3 @@ export class E2EPage {
ev.preventDefault();
}
}
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
export class E2EApp {
rootPage = E2EPage;
}
@NgModule({
declarations: [
E2EApp,
E2EPage
],
imports: [
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EPage
]
})
export class AppModule {}