test(e2e): update range, searchbar, toast

This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
jgw96
2017-03-03 15:57:28 -06:00
gitea-unlock(16/)
parent b12186bad1
commit 040981f585
octicon-diff(16/tw-mr-1) 14 changed files with 109 additions and 86 deletions

29
src/components/range/test/basic/app/app.module.ts Normal file
View File

@@ -0,0 +1,29 @@
import { Component, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, Range } from '../../../../..';
import { RootPage } from '../pages/root-page/root-page';
@Component({
templateUrl: 'main.html'
})
export class E2EApp {
rootPage = RootPage;
}
@NgModule({
declarations: [
E2EApp,
RootPage
],
imports: [
BrowserModule,
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
RootPage
]
})
export class AppModule {}

View File

View File

View File

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

View File

@@ -1,13 +1,11 @@
import { Component, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { Component } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { IonicApp, IonicModule, Range } from '../../../..';
import { Range } from '../../../../../..';
@Component({
templateUrl: 'page1.html'
templateUrl: 'root-page.html'
})
export class Page1 {
export class RootPage {
singleValue: number;
singleValue2: number = 150;
singleValue3: number = 64;
@@ -28,27 +26,3 @@ export class Page1 {
}
}
@Component({
templateUrl: 'main.html'
})
export class E2EApp {
rootPage = Page1;
}
@NgModule({
declarations: [
E2EApp,
Page1
],
imports: [
BrowserModule,
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
Page1
]
})
export class AppModule {}

29
src/components/searchbar/test/basic/app/app.module.ts Normal file
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

View File

@@ -44,4 +44,4 @@
<p padding>
<button ion-button block (click)="changeValue()">Change Value</button>
</p>
</ion-content>
</ion-content>

View File

@@ -1,12 +1,9 @@
import { Component, ChangeDetectorRef, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule } from '../../../..';
import { Component, ChangeDetectorRef } from '@angular/core';
@Component({
templateUrl: 'main.html'
templateUrl: 'root-page.html'
})
export class E2EPage {
export class RootPage {
defaultSearch: string = 'test';
customPlaceholder: number = 2;
defaultCancel: string = '';
@@ -49,27 +46,3 @@ export class E2EPage {
this.defaultSearch = 'changed';
}
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class E2EApp {
root = E2EPage;
}
@NgModule({
declarations: [
E2EApp,
E2EPage
],
imports: [
BrowserModule,
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
E2EPage
]
})
export class AppModule {}

View File

@@ -1,22 +1,6 @@
import { Component, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, Toast, ToastController, NavController } from '../../../..';
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Another Page</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<p>This is another page to show that the toast stays.</p>
</ion-content>
`
})
export class AnotherPage {}
import { IonicApp, IonicModule, Toast, ToastController, NavController } from '../../../../..';
@Component({
templateUrl: 'main.html'
@@ -37,7 +21,7 @@ export class E2EPage {
toast.present();
setTimeout(() => {
this.navCtrl.push(AnotherPage);
this.navCtrl.push('RootPage');
}, 1000);
setTimeout(() => {
@@ -85,7 +69,7 @@ export class E2EPage {
toast.present();
setTimeout(() => {
this.navCtrl.push(AnotherPage);
this.navCtrl.push('RootPage');
}, 1000);
}
@@ -105,18 +89,20 @@ export class E2EApp {
@NgModule({
declarations: [
E2EApp,
E2EPage,
AnotherPage
E2EPage
],
imports: [
BrowserModule,
IonicModule.forRoot(E2EApp)
IonicModule.forRoot(E2EApp, {}, {
links: [
{ loadChildren: '../pages/root-page/root-page.module#RootPageModule', name: 'RootPage' }
]
})
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
E2EPage,
AnotherPage
E2EPage
]
})
export class AppModule {}

View File

View File

17
src/components/toast/test/basic/pages/root-page/root-page.module.ts Normal file
View File

@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { RootPage } from './root-page';
import { DeepLinkModule } from '../../../../../../';
@NgModule({
declarations: [
RootPage
],
imports: [
DeepLinkModule.forChild(RootPage)
],
entryComponents: [
RootPage
],
providers: []
})
export class RootPageModule {}

15
src/components/toast/test/basic/pages/root-page/root-page.ts Normal file
View File

@@ -0,0 +1,15 @@
import { Component } from '@angular/core';
@Component({
template: `
<ion-header>
<ion-navbar>
<ion-title>Another Page</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<p>This is another page to show that the toast stays.</p>
</ion-content>
`
})
export class RootPage {}