test(bootstrap): update to use ionicBootstrap

This commit is contained in:
Adam Bradley
2016-05-31 15:49:12 -05:00
parent 94e938d6b3
commit 6e9087534d
114 changed files with 901 additions and 800 deletions

View File

@@ -1,11 +1,12 @@
import {App} from 'ionic-angular';
import {Component} from '@angular/core';
import {ionicBootstrap} from '../../../../../src';
@App({
templateUrl: 'main.html'
@Component({
templateUrl: 'main.html'
})
class E2EApp {
constructor() {
this.myValue = 'value';
}
class E2EPage {
myValue = 'value';
}
ionicBootstrap(E2EPage);

View File

@@ -1,7 +1,8 @@
import {App, Page} from '../../../../../src';
import {Component} from '@angular/core';
import {ionicBootstrap} from '../../../../../src';
@Page({
@Component({
templateUrl: 'main.html'
})
class PageOne {
@@ -13,9 +14,11 @@ class PageOne {
}
}
@App({
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class E2EApp {
root = PageOne;
}
ionicBootstrap(E2EApp);

View File

@@ -1,17 +1,17 @@
import {App} from '../../../../../src';
import {Component} from '@angular/core';
import {ionicBootstrap} from '../../../../../src';
@App({
@Component({
templateUrl: 'main.html'
})
class E2EApp {
constructor() {
this.myParam = '';
this.myValues = {
value1: 'Dynamic Input',
value2: 'Dynamic Textarea'
};
}
class E2EPage {
myParam = '';
myValues = {
value1: 'Dynamic Input',
value2: 'Dynamic Textarea'
};
}
ionicBootstrap(E2EPage);

View File

@@ -1,8 +1,9 @@
import {App, Page} from '../../../../../src';
import {FormBuilder, Validators, Control} from '@angular/common';
import {Component} from '@angular/core';
import {ionicBootstrap} from '../../../../../src';
import {FormBuilder, Validators} from '@angular/common';
@Page({
@Component({
templateUrl: 'main.html'
})
class E2EPage {
@@ -53,9 +54,11 @@ class E2EPage {
}
@App({
template: '<ion-nav [root]="rootPage"></ion-nav>'
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class E2EApp {
rootPage = E2EPage;
root = E2EPage;
}
ionicBootstrap(E2EApp);

View File

@@ -1,12 +1,15 @@
import {App} from '../../../../../src';
import {Component} from '@angular/core';
import {ionicBootstrap} from '../../../../../src';
@App({
@Component({
templateUrl: 'main.html'
})
class E2EApp {
class E2EPage {
submit(ev) {
console.debug('submit', ev);
}
}
ionicBootstrap(E2EPage);

View File

@@ -1,34 +1,36 @@
import {App} from '../../../../../src';
import {Component} from '@angular/core';
import {ionicBootstrap} from '../../../../../src';
@App({
templateUrl: 'main.html',
config: {
//scrollAssist: true
}
@Component({
templateUrl: 'main.html'
})
class E2EApp {
class E2EPage {
reload() {
window.location.reload();
}
}
document.addEventListener('click', function(ev) {
document.addEventListener('click', (ev: any) => {
console.log(`CLICK, ${ev.target.localName}.${ev.target.className}, time: ${Date.now()}`);
});
document.addEventListener('touchstart', function(ev) {
document.addEventListener('touchstart', (ev: any) => {
console.log(`TOUCH START, ${ev.target.localName}.${ev.target.className}, time: ${Date.now()}`);
});
document.addEventListener('touchend', function(ev) {
document.addEventListener('touchend', (ev: any) => {
console.log(`TOUCH END, ${ev.target.localName}.${ev.target.className}, time: ${Date.now()}`);
});
document.addEventListener('focusin', function(ev) {console.log(`CLICK, ${ev.target.localName}.${ev.target.className}, time: ${Date.now()}`);
document.addEventListener('focusin', (ev: any) => {
console.log(`CLICK, ${ev.target.localName}.${ev.target.className}, time: ${Date.now()}`);
console.log(`FOCUS IN, ${ev.target.localName}.${ev.target.className}, time: ${Date.now()}`);
});
document.addEventListener('focusout', function(ev) {console.log(`CLICK, ${ev.target.localName}.${ev.target.className}, time: ${Date.now()}`);
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()}`);
});
ionicBootstrap(E2EPage);

View File

@@ -1,7 +1,10 @@
import {App} from '../../../../../src';
import {Component} from '@angular/core';
import {ionicBootstrap} from '../../../../../src';
@App({
@Component({
templateUrl: 'main.html'
})
class E2EApp {}
class E2EPage {}
ionicBootstrap(E2EPage);

View File

@@ -1,7 +1,10 @@
import {App} from '../../../../../src';
import {Component} from '@angular/core';
import {ionicBootstrap} from '../../../../../src';
@App({
@Component({
templateUrl: 'main.html'
})
class E2EApp {}
class E2EPage {}
ionicBootstrap(E2EPage);

View File

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