test(ngmodule): update to ngmodule

This commit is contained in:
Adam Bradley
2016-09-13 15:44:02 -05:00
parent b8fb9c7c6d
commit d7be8a80c0
232 changed files with 4612 additions and 4893 deletions

View File

@@ -0,0 +1,36 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../..';
@Component({
templateUrl: 'main.html'
})
export class E2EPage {
myValue = 'value';
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

@@ -1,23 +0,0 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from '../../../../../src';
@Component({
templateUrl: 'main.html'
})
class E2EPage {
myValue = 'value';
clicked() {
console.log('clicked button');
}
}
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
class E2EApp {
rootPage = E2EPage;
}
ionicBootstrap(E2EApp);

View File

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

View File

@@ -1,24 +0,0 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from '../../../../../src';
@Component({
templateUrl: 'main.html'
})
class PageOne {
url: string;
input1: string = 'Text 1';
onEvent(event: any) {
console.log('Did Event:', event.type);
}
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class E2EApp {
root = PageOne;
}
ionicBootstrap(E2EApp);

View File

@@ -0,0 +1,37 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../..';
@Component({
templateUrl: 'main.html'
})
export class E2EPage {
myParam = '';
myValues = {
value1: 'Dynamic Input',
value2: 'Dynamic Textarea'
};
}
@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,24 +0,0 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from '../../../../../src';
@Component({
templateUrl: 'main.html'
})
class E2EPage {
myParam = '';
myValues = {
value1: 'Dynamic Input',
value2: 'Dynamic Textarea'
};
}
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
class E2EApp {
rootPage = E2EPage;
}
ionicBootstrap(E2EApp);

View File

@@ -1,18 +1,21 @@
import { Component } from '@angular/core';
import { FormBuilder, Validators } from '@angular/common';
import { ionicBootstrap } from '../../../../../src';
import { FormBuilder, Validators } from '@angular/forms';
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../..';
@Component({
templateUrl: 'main.html'
})
class E2EPage {
export class E2EPage {
loginForm: any;
userForm: any;
login = {
email: 'help@ionic.io',
username: 'admin'
username: 'admin',
password: '',
gender: '',
comments: ''
};
user = {
@@ -63,8 +66,21 @@ class E2EPage {
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class E2EApp {
export class E2EApp {
root = E2EPage;
}
ionicBootstrap(E2EApp);
@NgModule({
declarations: [
E2EApp,
E2EPage
],
imports: [
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EPage
]
})
export class AppModule {}

View File

@@ -1,17 +1,20 @@
import { Component } from '@angular/core';
import { FormBuilder, Validators } from '@angular/common';
import { ionicBootstrap } from '../../../../../src';
import { FormBuilder, Validators } from '@angular/forms';
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../..';
@Component({
templateUrl: 'main.html'
})
class E2EPage {
export class E2EPage {
loginForm: any;
login = {
email: 'help@ionic.io',
username: 'admin',
password: '',
comments: '',
inset: ''
};
submitted: boolean = false;
@@ -47,8 +50,22 @@ class E2EPage {
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class E2EApp {
export class E2EApp {
root = E2EPage;
}
ionicBootstrap(E2EApp);
@NgModule({
declarations: [
E2EApp,
E2EPage
],
imports: [
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
E2EPage
]
})
export class AppModule {}

View File

@@ -0,0 +1,35 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../..';
@Component({
templateUrl: 'main.html'
})
export class E2EPage {
submit(ev: any) {
console.debug('submit', ev);
}
}
@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,22 +0,0 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from '../../../../../src';
@Component({
templateUrl: 'main.html'
})
class E2EPage {
submit(ev: any) {
console.debug('submit', ev);
}
}
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
class E2EApp {
rootPage = E2EPage;
}
ionicBootstrap(E2EApp);

View File

@@ -1,11 +1,11 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from '../../../../../src';
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../..';
@Component({
templateUrl: 'main.html'
})
class E2EPage {
export class E2EPage {
reload() {
window.location.reload();
}
@@ -36,8 +36,21 @@ document.addEventListener('focusout', (ev: any) => {
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
class E2EApp {
export class E2EApp {
rootPage = E2EPage;
}
ionicBootstrap(E2EApp);
@NgModule({
declarations: [
E2EApp,
E2EPage
],
imports: [
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EPage
]
})
export class AppModule {}

View File

@@ -33,7 +33,7 @@
<ion-input value="value"></ion-input>
</ion-item>
<button ion-button ion-item>
<button ion-item>
Button Item
</button>

View File

@@ -0,0 +1,31 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../..';
@Component({
templateUrl: 'main.html'
})
export class E2EPage {}
@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

@@ -1,17 +0,0 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from '../../../../../src';
@Component({
templateUrl: 'main.html'
})
class E2EPage {}
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
class E2EApp {
rootPage = E2EPage;
}
ionicBootstrap(E2EApp);

View File

@@ -0,0 +1,31 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../..';
@Component({
templateUrl: 'main.html'
})
export class E2EPage {}
@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

@@ -1,17 +0,0 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from '../../../../../src';
@Component({
templateUrl: 'main.html'
})
class E2EPage {}
@Component({
template: '<ion-nav [root]="rootPage"></ion-nav>'
})
class E2EApp {
rootPage = E2EPage;
}
ionicBootstrap(E2EApp);

View File

@@ -0,0 +1,34 @@
import { Component, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../..';
@Component({
templateUrl: 'main.html'
})
export class PageOne {
gender = '';
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class E2EApp {
root = PageOne;
}
@NgModule({
declarations: [
E2EApp,
PageOne
],
imports: [
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
PageOne
]
})
export class AppModule {}

View File

@@ -1,18 +0,0 @@
import { Component } from '@angular/core';
import { ionicBootstrap } from '../../../../../src';
@Component({
templateUrl: 'main.html'
})
class PageOne {}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class E2EApp {
root = PageOne;
}
ionicBootstrap(E2EApp);

View File

@@ -1,7 +1,6 @@
import { TextInput } from '../../../../src';
export function run() {
import { TextInput } from '../input';
describe('input', () => {
it('should scroll, top and bottom below safe area, no room to scroll', () => {
let inputOffsetTop = 350;
let inputOffsetHeight = 35;
@@ -131,5 +130,4 @@ export function run() {
let scrollData = TextInput.getScrollData(inputOffsetTop, inputOffsetHeight, scrollViewDimensions, keyboardHeight, platformHeight);
expect(scrollData.scrollAmount).toBe(0);
});
}
});