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

@@ -0,0 +1,10 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'root-page.html'
})
export class RootPage {
myValue = '';
myValue2 = '';
}

View File

@@ -1,46 +0,0 @@
import { Component, NgModule } from '@angular/core';
import { FormBuilder, Validators } from '@angular/forms';
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
@Component({
templateUrl: 'main.html'
})
export class E2EPage {
userForm: any;
myValue = 'really long value that overflows to show padding';
constructor(fb: FormBuilder) {
this.userForm = fb.group({
username: [{value: '', disabled: false}, Validators.required],
password: [{value: '', disabled: false}, Validators.required],
});
}
clicked() {
console.log('clicked button');
}
}
@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 {}

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

@@ -0,0 +1,22 @@
import { Component } from '@angular/core';
import { FormBuilder, Validators } from '@angular/forms';
@Component({
templateUrl: 'root-page.html'
})
export class RootPage {
userForm: any;
myValue = 'really long value that overflows to show padding';
constructor(fb: FormBuilder) {
this.userForm = fb.group({
username: [{value: '', disabled: false}, Validators.required],
password: [{value: '', disabled: false}, Validators.required],
});
}
clicked() {
console.log('clicked button');
}
}

View File

@@ -1,33 +1,28 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../..';
@Component({
templateUrl: 'main.html'
})
export class E2EPage {
myValue = '';
myValue2 = '';
}
import { RootPage } from '../pages/root-page/root-page';
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
export class E2EApp {
rootPage = E2EPage;
rootPage = RootPage;
}
@NgModule({
declarations: [
E2EApp,
E2EPage
RootPage
],
imports: [
BrowserModule,
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EPage
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,11 +1,10 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule, TextInput } from '../../../../../ionic-angular';
import { Component } from '@angular/core';
import { TextInput } from '../../../../../../';
@Component({
templateUrl: 'main.html'
templateUrl: 'root-page.html'
})
export class E2EPage {
export class RootPage {
ngvalue1: any;
ngvalue2: any;
value2: any;
@@ -39,25 +38,3 @@ export class E2EPage {
console.log('value6', this.value6);
}
}
@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 {}

View File

@@ -1,37 +1,28 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../../';
@Component({
templateUrl: 'main.html'
})
export class PageOne {
url: string;
input1: string = 'Text 1';
onEvent(event: any) {
console.log('Did Event:', event.type);
}
}
import { RootPage } from '../pages/root-page/root-page';
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class E2EApp {
root = PageOne;
root = RootPage;
}
@NgModule({
declarations: [
E2EApp,
PageOne
RootPage
],
imports: [
BrowserModule,
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
PageOne
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

@@ -93,4 +93,4 @@
<p>{{url}}</p>
</ion-content>
</ion-content>

View File

@@ -0,0 +1,13 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'root-page.html'
})
export class RootPage {
url: string;
input1: string = 'Text 1';
onEvent(event: any) {
console.log('Did Event:', event.type);
}
}

View File

@@ -1,46 +0,0 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
@Component({
templateUrl: 'main.html'
})
export class E2EPage {
myParam = '';
minValue = 8;
maxValue = 12;
stepValue = 2;
myValues = {
value1: 'Dynamic Input',
value2: 'Dynamic Textarea'
};
toggleValues() {
this.minValue === 8 ? this.minValue = 4 : this.minValue = 8;
this.maxValue === 12 ? this.maxValue = 20 : this.maxValue = 12;
this.stepValue === 2 ? this.stepValue = 4 : this.stepValue = 2;
}
}
@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 {}

View File

@@ -1,35 +1,28 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../../';
@Component({
templateUrl: 'main.html'
})
export class E2EPage {
submit(ev: any) {
console.debug('submit', ev);
}
}
import { RootPage } from '../pages/root-page/root-page';
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
export class E2EApp {
rootPage = E2EPage;
rootPage = RootPage;
}
@NgModule({
declarations: [
E2EApp,
E2EPage
RootPage
],
imports: [
BrowserModule,
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EPage
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

@@ -88,4 +88,4 @@
img {
height: 100px;
}
</style>
</style>

View File

@@ -0,0 +1,22 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'root-page.html'
})
export class RootPage {
myParam = '';
minValue = 8;
maxValue = 12;
stepValue = 2;
myValues = {
value1: 'Dynamic Input',
value2: 'Dynamic Textarea'
};
toggleValues() {
this.minValue === 8 ? this.minValue = 4 : this.minValue = 8;
this.maxValue === 12 ? this.maxValue = 20 : this.maxValue = 12;
this.stepValue === 2 ? this.stepValue = 4 : this.stepValue = 2;
}
}

View File

@@ -1,31 +1,28 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../..';
@Component({
templateUrl: 'main.html'
})
export class E2EPage {
}
import { RootPage } from '../pages/root-page/root-page';
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
export class E2EApp {
rootPage = E2EPage;
rootPage = RootPage;
}
@NgModule({
declarations: [
E2EApp,
E2EPage
RootPage
],
imports: [
BrowserModule,
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EPage
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

@@ -0,0 +1,7 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'root-page.html'
})
export class RootPage {
}

View File

@@ -0,0 +1,28 @@
import { Component, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../..';
import { RootPage } from '../pages/root-page/root-page';
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class E2EApp {
root = RootPage;
}
@NgModule({
declarations: [
E2EApp,
RootPage
],
imports: [
BrowserModule,
IonicModule.forRoot(E2EApp)
],
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,12 +1,10 @@
import { FormBuilder, Validators } from '@angular/forms';
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
import { Component } from '@angular/core';
@Component({
templateUrl: 'main.html'
templateUrl: 'root-page.html'
})
export class E2EPage {
export class RootPage {
loginForm: any;
userForm: any;
@@ -67,25 +65,3 @@ export class E2EPage {
}
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class E2EApp {
root = E2EPage;
}
@NgModule({
declarations: [
E2EApp,
E2EPage
],
imports: [
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EPage
]
})
export class AppModule {}

View File

@@ -1,34 +1,29 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
@Component({
templateUrl: 'main.html'
})
export class PageOne {
gender = '';
}
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../..';
import { RootPage } from '../pages/root-page/root-page';
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class E2EApp {
root = PageOne;
root = RootPage;
}
@NgModule({
declarations: [
E2EApp,
PageOne
RootPage
],
imports: [
BrowserModule,
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
PageOne
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

@@ -102,4 +102,4 @@
</ion-list>
</ion-card>
</form>
</ion-content>
</ion-content>

View File

@@ -1,12 +1,10 @@
import { FormBuilder, Validators } from '@angular/forms';
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
import { Component } from '@angular/core';
@Component({
templateUrl: 'main.html'
templateUrl: 'root-page.html'
})
export class E2EPage {
export class RootPage {
loginForm: any;
login = {
@@ -46,26 +44,3 @@ export class E2EPage {
}
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class E2EApp {
root = E2EPage;
}
@NgModule({
declarations: [
E2EApp,
E2EPage
],
imports: [
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
E2EPage
]
})
export class AppModule {}

View File

@@ -0,0 +1,28 @@
import { Component, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../..';
import { RootPage } from '../pages/root-page/root-page';
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
export class E2EApp {
rootPage = RootPage;
}
@NgModule({
declarations: [
E2EApp,
RootPage
],
imports: [
BrowserModule,
IonicModule.forRoot(E2EApp)
],
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

@@ -100,4 +100,4 @@
</form>
</ion-content>
</ion-content>

View File

@@ -0,0 +1,11 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'root-page.html'
})
export class RootPage {
submit(ev: any) {
console.debug('submit', ev);
}
}

View File

@@ -0,0 +1,31 @@
import { Component, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../..';
import { RootPage } from '../pages/root-page/root-page';
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
export class E2EApp {
rootPage = RootPage;
}
@NgModule({
declarations: [
E2EApp,
RootPage
],
imports: [
BrowserModule,
IonicModule.forRoot(E2EApp, {
inputCloning: true,
scrollAssist: true
})
],
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

@@ -221,4 +221,4 @@
</ion-list>
</ion-content>
</ion-content>

View File

@@ -1,11 +1,9 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
import { Component } from '@angular/core';
@Component({
templateUrl: 'main.html'
templateUrl: 'root-page.html'
})
export class E2EPage {
export class RootPage {
reload() {
window.location.reload();
}
@@ -32,28 +30,3 @@ document.addEventListener('focusout', (ev: any) => {
console.log(`CLICK, ${ev.target.localName}.${ev.target.className}, time: ${Date.now()}`);
console.log(`FOCUS OUT, ${ev.target.localName}.${ev.target.className}, time: ${Date.now()}`);
});
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
export class E2EApp {
rootPage = E2EPage;
}
@NgModule({
declarations: [
E2EApp,
E2EPage
],
imports: [
IonicModule.forRoot(E2EApp, {
inputCloning: true,
scrollAssist: true
})
],
bootstrap: [IonicApp],
entryComponents: [
E2EPage
]
})
export class AppModule {}

View File

@@ -1,31 +1,29 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../..';
@Component({
templateUrl: 'main.html'
})
export class E2EPage {}
import { RootPage } from '../pages/root-page/root-page';
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
export class E2EApp {
rootPage = E2EPage;
rootPage = RootPage;
}
@NgModule({
declarations: [
E2EApp,
E2EPage
RootPage
],
imports: [
BrowserModule,
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
E2EPage
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

@@ -69,4 +69,4 @@
</ion-card>
</ion-content>
</ion-content>

View File

@@ -0,0 +1,6 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'root-page.html'
})
export class RootPage {}

View File

@@ -1,38 +0,0 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
@Component({
templateUrl: 'main.html'
})
export class E2EPage {
isReadonly: boolean = true;
toggleReadonly() {
this.isReadonly = !this.isReadonly;
}
}
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
export class E2EApp {
rootPage = E2EPage;
}
@NgModule({
declarations: [
E2EApp,
E2EPage
],
imports: [
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
E2EPage
]
})
export class AppModule {}

View File

@@ -0,0 +1,29 @@
import { Component, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../..';
import { RootPage } from '../pages/root-page/root-page';
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
export class E2EApp {
rootPage = RootPage;
}
@NgModule({
declarations: [
E2EApp,
RootPage
],
imports: [
BrowserModule,
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
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

@@ -0,0 +1,13 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'root-page.html'
})
export class RootPage {
isReadonly: boolean = true;
toggleReadonly() {
this.isReadonly = !this.isReadonly;
}
}

View File

@@ -0,0 +1,29 @@
import { Component, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../../..';
import { RootPage } from '../pages/root-page/root-page';
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class E2EApp {
root = RootPage;
}
@NgModule({
declarations: [
E2EApp,
RootPage
],
imports: [
BrowserModule,
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
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

@@ -74,4 +74,4 @@
</ion-list>
</ion-content>
</ion-content>

View File

@@ -0,0 +1,8 @@
import { Component } from '@angular/core';
@Component({
templateUrl: 'root-page.html'
})
export class RootPage {
gender = '';
}