diff --git a/.travis.yml b/.travis.yml index 220d6de02a..577f2bd763 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,8 +38,7 @@ env: # Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete. - CI_MODE=js - CI_MODE=lint -# - CI_MODE=dart - - CI_MODE=build_only + - CI_MODE=e2e - CI_MODE=saucelabs_required - CI_MODE=browserstack_required diff --git a/build.sh b/build.sh index 9263449503..bed893a794 100755 --- a/build.sh +++ b/build.sh @@ -8,6 +8,25 @@ cd `dirname $0` TSCONFIG=./modules/tsconfig.json echo "====== (all)COMPILING: \$(npm bin)/ng2tc -p ${TSCONFIG} =====" rm -rf ./dist/all/ +mkdir ./dist/all/ + +# prepare all files for e2e tests +cp -r ./modules/playground ./dist/all/ +cp -r ./modules/playground/favicon.ico ./dist/ +#rsync -aP ./modules/playground/* ./dist/all/playground/ +mkdir ./dist/all/playground/vendor +cd ./dist/all/playground/vendor +ln -s ../../../../node_modules/es6-shim/es6-shim.js . +ln -s ../../../../node_modules/zone.js/dist/zone.js . +ln -s ../../../../node_modules/zone.js/dist/long-stack-trace-zone.js . +ln -s ../../../../node_modules/systemjs/dist/system.src.js . +ln -s ../../../../node_modules/base64-js/lib/b64.js . +ln -s ../../../../node_modules/reflect-metadata/Reflect.js . +ln -s ../../../../node_modules/rxjs/bundles/Rx.js . +ln -s ../../../../node_modules/angular/angular.js . +cd - + +# compile ts code $(npm bin)/ng2tc -p ${TSCONFIG} diff --git a/modules/playground/e2e_test/async/async_spec.ts b/modules/playground/e2e_test/async/async_spec.ts index 6c865e8483..e5d1c54c9c 100644 --- a/modules/playground/e2e_test/async/async_spec.ts +++ b/modules/playground/e2e_test/async/async_spec.ts @@ -1,7 +1,7 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; describe('async', () => { - var URL = 'playground/src/async/index.html'; + var URL = 'all/playground/src/async/index.html'; beforeEach(() => browser.get(URL)); diff --git a/modules/playground/e2e_test/hash_routing/hash_location_spec.ts b/modules/playground/e2e_test/hash_routing/hash_location_spec.ts index bcc5cd2528..1ab50246a1 100644 --- a/modules/playground/e2e_test/hash_routing/hash_location_spec.ts +++ b/modules/playground/e2e_test/hash_routing/hash_location_spec.ts @@ -1,4 +1,4 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; function waitForElement(selector) { var EC = (protractor).ExpectedConditions; @@ -9,7 +9,7 @@ function waitForElement(selector) { describe('hash routing example app', function() { afterEach(verifyNoBrowserErrors); - var URL = 'playground/src/hash_routing/index.html'; + var URL = 'all/playground/src/hash_routing/index.html'; it('should navigate between routes', function() { browser.get(URL + '#/bye'); @@ -28,7 +28,7 @@ describe('hash routing example app', function() { it('should open in new window if target is _blank', () => { - var URL = 'playground/src/hash_routing/index.html'; + var URL = 'all/playground/src/hash_routing/index.html'; browser.get(URL + '#/'); waitForElement('hello-cmp'); diff --git a/modules/playground/e2e_test/hello_world/hello_world_spec.ts b/modules/playground/e2e_test/hello_world/hello_world_spec.ts index 7afb3db4dd..6a948ebb10 100644 --- a/modules/playground/e2e_test/hello_world/hello_world_spec.ts +++ b/modules/playground/e2e_test/hello_world/hello_world_spec.ts @@ -1,11 +1,11 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; describe('hello world', function() { afterEach(verifyNoBrowserErrors); describe('hello world app', function() { - var URL = 'playground/src/hello_world/index.html'; + var URL = 'all/playground/src/hello_world/index.html'; it('should greet', function() { browser.get(URL); diff --git a/modules/playground/e2e_test/http/http_spec.ts b/modules/playground/e2e_test/http/http_spec.ts index 72b239946e..8959ee8013 100644 --- a/modules/playground/e2e_test/http/http_spec.ts +++ b/modules/playground/e2e_test/http/http_spec.ts @@ -1,11 +1,11 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; describe('http', function() { afterEach(verifyNoBrowserErrors); describe('fetching', function() { - var URL = 'playground/src/http/index.html'; + var URL = 'all/playground/src/http/index.html'; it('should fetch and display people', function() { browser.get(URL); diff --git a/modules/playground/e2e_test/jsonp/jsonp_spec.ts b/modules/playground/e2e_test/jsonp/jsonp_spec.ts index 095d6bc4bc..a8f0b5af5b 100644 --- a/modules/playground/e2e_test/jsonp/jsonp_spec.ts +++ b/modules/playground/e2e_test/jsonp/jsonp_spec.ts @@ -1,11 +1,11 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; describe('jsonp', function() { afterEach(verifyNoBrowserErrors); describe('fetching', function() { - var URL = 'playground/src/jsonp/index.html'; + var URL = 'all/playground/src/jsonp/index.html'; it('should fetch and display people', function() { browser.get(URL); diff --git a/modules/playground/e2e_test/key_events/key_events_spec.ts b/modules/playground/e2e_test/key_events/key_events_spec.ts index 6a62e8d1ea..2a0f96186b 100644 --- a/modules/playground/e2e_test/key_events/key_events_spec.ts +++ b/modules/playground/e2e_test/key_events/key_events_spec.ts @@ -2,7 +2,7 @@ import {verifyNoBrowserErrors} from '@angular/platform-browser/testing/e2e_util' describe('key_events', function() { - var URL = 'playground/src/key_events/index.html'; + var URL = 'all/playground/src/key_events/index.html?bundles=false'; afterEach(verifyNoBrowserErrors); beforeEach(() => { browser.get(URL); }); diff --git a/modules/playground/e2e_test/model_driven_forms/model_driven_forms_spec.ts b/modules/playground/e2e_test/model_driven_forms/model_driven_forms_spec.ts index 9d1f48469e..73c4126de2 100644 --- a/modules/playground/e2e_test/model_driven_forms/model_driven_forms_spec.ts +++ b/modules/playground/e2e_test/model_driven_forms/model_driven_forms_spec.ts @@ -1,10 +1,10 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; describe('Model-Driven Forms', function() { afterEach(verifyNoBrowserErrors); - var URL = 'playground/src/model_driven_forms/index.html'; + var URL = 'all/playground/src/model_driven_forms/index.html'; it('should display errors', function() { browser.get(URL); diff --git a/modules/playground/e2e_test/order_management/order_management_spec.ts b/modules/playground/e2e_test/order_management/order_management_spec.ts index 12556781de..4fea0414fe 100644 --- a/modules/playground/e2e_test/order_management/order_management_spec.ts +++ b/modules/playground/e2e_test/order_management/order_management_spec.ts @@ -1,7 +1,7 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; describe('Order Management CRUD', function() { - var URL = 'playground/src/order_management/index.html'; + var URL = 'all/playground/src/order_management/index.html'; it('should work', function() { browser.get(URL); diff --git a/modules/playground/e2e_test/person_management/person_management_spec.ts b/modules/playground/e2e_test/person_management/person_management_spec.ts index c786d37565..9045c787e7 100644 --- a/modules/playground/e2e_test/person_management/person_management_spec.ts +++ b/modules/playground/e2e_test/person_management/person_management_spec.ts @@ -1,7 +1,7 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; describe('Person Management CRUD', function() { - var URL = 'playground/src/person_management/index.html'; + var URL = 'all/playground/src/person_management/index.html'; it('should work', function() { browser.get(URL); diff --git a/modules/playground/e2e_test/relative_assets/assets_spec.ts b/modules/playground/e2e_test/relative_assets/assets_spec.ts index 7309c414f0..ff7b5a574f 100644 --- a/modules/playground/e2e_test/relative_assets/assets_spec.ts +++ b/modules/playground/e2e_test/relative_assets/assets_spec.ts @@ -1,4 +1,4 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; function waitForElement(selector) { var EC = (protractor).ExpectedConditions; @@ -10,7 +10,7 @@ describe('relative assets relative-app', () => { afterEach(verifyNoBrowserErrors); - var URL = 'playground/src/relative_assets/'; + var URL = 'all/playground/src/relative_assets/'; it('should load in the templateUrl relative to the my-cmp component', () => { browser.get(URL); diff --git a/modules/playground/e2e_test/routing/routing_spec.ts b/modules/playground/e2e_test/routing/routing_spec.ts index 84e588d2c6..1aa5425fbb 100644 --- a/modules/playground/e2e_test/routing/routing_spec.ts +++ b/modules/playground/e2e_test/routing/routing_spec.ts @@ -1,4 +1,4 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; function waitForElement(selector) { var EC = (protractor).ExpectedConditions; @@ -11,7 +11,7 @@ describe('routing inbox-app', () => { afterEach(verifyNoBrowserErrors); describe('index view', () => { - var URL = 'playground/src/routing/'; + var URL = 'all/playground/src/routing/'; it('should list out the current collection of items', () => { browser.get(URL); @@ -31,7 +31,7 @@ describe('routing inbox-app', () => { describe('drafts view', () => { - var URL = 'playground/src/routing/#/drafts'; + var URL = 'all/playground/src/routing/#/drafts'; it('should navigate to the drafts view when the drafts link is clicked', () => { browser.get(URL); @@ -55,7 +55,7 @@ describe('routing inbox-app', () => { describe('detail view', () => { - var URL = 'playground/src/routing/'; + var URL = 'all/playground/src/routing/'; it('should navigate to the detail view when an email is clicked', () => { browser.get(URL); diff --git a/modules/playground/e2e_test/sourcemap/sourcemap_spec.ts b/modules/playground/e2e_test/sourcemap/sourcemap_spec.ts index 91f5d68662..b33741fae3 100644 --- a/modules/playground/e2e_test/sourcemap/sourcemap_spec.ts +++ b/modules/playground/e2e_test/sourcemap/sourcemap_spec.ts @@ -1,10 +1,10 @@ -import * as testUtil from '@angular/testing/src/e2e_util'; +import * as testUtil from '@angular/platform-browser/testing_e2e'; var fs = require('fs'); var sourceMap = require('source-map'); describe('sourcemaps', function() { - var URL = 'playground/src/sourcemap/index.html'; + var URL = 'all/playground/src/sourcemap/index.html'; it('should map sources', function() { browser.get(URL); @@ -30,7 +30,7 @@ describe('sourcemaps', function() { const content = - fs.readFileSync('dist/js/dev/es5/playground/src/sourcemap/index.js').toString("utf8"); + fs.readFileSync('dist/all/playground/src/sourcemap/index.js').toString("utf8"); const marker = "//# sourceMappingURL=data:application/json;base64,"; const index = content.indexOf(marker); const sourceMapData = diff --git a/modules/playground/e2e_test/svg/svg_spec.ts b/modules/playground/e2e_test/svg/svg_spec.ts index 724e9df3b4..41281c43ec 100644 --- a/modules/playground/e2e_test/svg/svg_spec.ts +++ b/modules/playground/e2e_test/svg/svg_spec.ts @@ -1,8 +1,8 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; describe('SVG', function() { - var URL = 'playground/src/svg/index.html'; + var URL = 'all/playground/src/svg/index.html'; afterEach(verifyNoBrowserErrors); beforeEach(() => { browser.get(URL); }); diff --git a/modules/playground/e2e_test/template_driven_forms/template_driven_forms_spec.ts b/modules/playground/e2e_test/template_driven_forms/template_driven_forms_spec.ts index 57b37e7a34..7f2157bd90 100644 --- a/modules/playground/e2e_test/template_driven_forms/template_driven_forms_spec.ts +++ b/modules/playground/e2e_test/template_driven_forms/template_driven_forms_spec.ts @@ -1,10 +1,10 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; describe('Template-Driven Forms', function() { afterEach(verifyNoBrowserErrors); - var URL = 'playground/src/template_driven_forms/index.html'; + var URL = 'all/playground/src/template_driven_forms/index.html'; it('should display errors', function() { browser.get(URL); diff --git a/modules/playground/e2e_test/web_workers/input/input_spec.ts b/modules/playground/e2e_test/web_workers/input/input_spec.ts index 6ba8e56b17..1ed6c06e4f 100644 --- a/modules/playground/e2e_test/web_workers/input/input_spec.ts +++ b/modules/playground/e2e_test/web_workers/input/input_spec.ts @@ -1,4 +1,4 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; describe('WebWorkers Input', function() { afterEach(() => { @@ -6,7 +6,7 @@ describe('WebWorkers Input', function() { browser.ignoreSynchronization = false; }); const selector = 'input-app'; - const URL = 'playground/src/web_workers/input/index.html'; + const URL = 'all/playground/src/web_workers/input/index.html'; const VALUE = 'test val'; it('should bootstrap', () => { diff --git a/modules/playground/e2e_test/web_workers/kitchen_sink/kitchen_sink_spec.ts b/modules/playground/e2e_test/web_workers/kitchen_sink/kitchen_sink_spec.ts index 7a2c3b8d95..04858b2ca6 100644 --- a/modules/playground/e2e_test/web_workers/kitchen_sink/kitchen_sink_spec.ts +++ b/modules/playground/e2e_test/web_workers/kitchen_sink/kitchen_sink_spec.ts @@ -1,4 +1,4 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; describe('WebWorkers Kitchen Sink', function() { afterEach(() => { @@ -6,7 +6,7 @@ describe('WebWorkers Kitchen Sink', function() { browser.ignoreSynchronization = false; }); var selector = "hello-app .greeting"; - var URL = "playground/src/web_workers/kitchen_sink/index.html"; + var URL = 'all/playground/src/web_workers/kitchen_sink/index.html'; it('should greet', () => { // This test can't wait for Angular 2 as Testability is not available when using WebWorker diff --git a/modules/playground/e2e_test/web_workers/message_broker/message_broker_spec.ts b/modules/playground/e2e_test/web_workers/message_broker/message_broker_spec.ts index f7023f2d5f..22a978509a 100644 --- a/modules/playground/e2e_test/web_workers/message_broker/message_broker_spec.ts +++ b/modules/playground/e2e_test/web_workers/message_broker/message_broker_spec.ts @@ -1,7 +1,6 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; -import {PromiseWrapper} from '@angular/facade'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; -var URL = 'playground/src/web_workers/message_broker/index.html'; +var URL = 'all/playground/src/web_workers/message_broker/index.html'; describe("MessageBroker", function() { diff --git a/modules/playground/e2e_test/web_workers/router/router_spec.ts b/modules/playground/e2e_test/web_workers/router/router_spec.ts index 5ecf506d48..1e277f5f5d 100644 --- a/modules/playground/e2e_test/web_workers/router/router_spec.ts +++ b/modules/playground/e2e_test/web_workers/router/router_spec.ts @@ -1,4 +1,4 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; describe("WebWorker Router", () => { beforeEach(() => { @@ -14,7 +14,7 @@ describe("WebWorker Router", () => { let contentSelector = "app main h1"; let navSelector = "app nav ul"; - var baseUrl = "playground/src/web_workers/router/index.html"; + var baseUrl = 'all/playground/src/web_workers/router/index.html'; it("should route on click", () => { browser.get(baseUrl); diff --git a/modules/playground/e2e_test/web_workers/todo/todo_spec.ts b/modules/playground/e2e_test/web_workers/todo/todo_spec.ts index 8fc116babe..a27673a7d6 100644 --- a/modules/playground/e2e_test/web_workers/todo/todo_spec.ts +++ b/modules/playground/e2e_test/web_workers/todo/todo_spec.ts @@ -1,4 +1,4 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; describe('WebWorkers Todo', function() { afterEach(() => { @@ -6,7 +6,7 @@ describe('WebWorkers Todo', function() { browser.ignoreSynchronization = false; }); - var URL = "playground/src/web_workers/todo/index.html"; + var URL = 'all/playground/src/web_workers/todo/index.html'; it('should bootstrap', () => { // This test can't wait for Angular 2 as Testability is not available when using WebWorker diff --git a/modules/playground/e2e_test/zippy_component/zippy_spec.ts b/modules/playground/e2e_test/zippy_component/zippy_spec.ts index e0c291e886..8b6e38b31b 100644 --- a/modules/playground/e2e_test/zippy_component/zippy_spec.ts +++ b/modules/playground/e2e_test/zippy_component/zippy_spec.ts @@ -1,11 +1,11 @@ -import {verifyNoBrowserErrors} from '@angular/testing/src/e2e_util'; +import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e'; describe('Zippy Component', function() { afterEach(verifyNoBrowserErrors); describe('zippy', function() { - var URL = 'playground/src/zippy_component/index.html'; + var URL = 'all/playground/src/zippy_component/index.html'; beforeEach(function() { browser.get(URL); }); diff --git a/modules/playground/favicon.ico b/modules/playground/favicon.ico new file mode 100644 index 0000000000..8081c7ceaf Binary files /dev/null and b/modules/playground/favicon.ico differ diff --git a/modules/playground/src/alt_routing/data.ts b/modules/playground/src/alt_routing/app/data.ts similarity index 100% rename from modules/playground/src/alt_routing/data.ts rename to modules/playground/src/alt_routing/app/data.ts diff --git a/modules/playground/src/alt_routing/drafts.html b/modules/playground/src/alt_routing/app/drafts.html similarity index 100% rename from modules/playground/src/alt_routing/drafts.html rename to modules/playground/src/alt_routing/app/drafts.html diff --git a/modules/playground/src/alt_routing/inbox-app.html b/modules/playground/src/alt_routing/app/inbox-app.html similarity index 100% rename from modules/playground/src/alt_routing/inbox-app.html rename to modules/playground/src/alt_routing/app/inbox-app.html diff --git a/modules/playground/src/alt_routing/inbox-app.ts b/modules/playground/src/alt_routing/app/inbox-app.ts similarity index 87% rename from modules/playground/src/alt_routing/inbox-app.ts rename to modules/playground/src/alt_routing/app/inbox-app.ts index 87adaf8da3..5c3ae75d77 100644 --- a/modules/playground/src/alt_routing/inbox-app.ts +++ b/modules/playground/src/alt_routing/app/inbox-app.ts @@ -1,4 +1,4 @@ -import {Component, Injectable} from 'angular2/core'; +import {Component, Injectable} from '@angular/core'; import { Routes, Route, @@ -11,10 +11,10 @@ import { UrlTree } from 'angular2/alt_router'; import * as db from './data'; -import {Location} from 'angular2/platform/common'; -import {PromiseWrapper} from 'angular2/src/facade/async'; -import {isPresent, DateWrapper} from 'angular2/src/facade/lang'; -import {PromiseCompleter} from 'angular2/src/facade/promise'; +import {Location} from '@angular/common'; +import {PromiseWrapper} from '@angular/core/src/facade/async'; +import {isPresent, DateWrapper} from '@angular/core/src/facade/lang'; +import {PromiseCompleter} from '@angular/core/src/facade/promise'; class InboxRecord { id: string = ''; @@ -93,7 +93,7 @@ class DbService { } @Component( - {selector: 'inbox-detail', directives: ROUTER_DIRECTIVES, templateUrl: 'inbox-detail.html'}) + {selector: 'inbox-detail', directives: ROUTER_DIRECTIVES, templateUrl: 'app/inbox-detail.html'}) class InboxDetailCmp implements OnActivate { record: InboxRecord = new InboxRecord(); ready: boolean = false; @@ -107,7 +107,7 @@ class InboxDetailCmp implements OnActivate { } } -@Component({selector: 'inbox', templateUrl: 'inbox.html', directives: ROUTER_DIRECTIVES}) +@Component({selector: 'inbox', templateUrl: 'app/inbox.html', directives: ROUTER_DIRECTIVES}) class InboxCmp implements OnActivate { items: InboxRecord[] = []; ready: boolean = false; @@ -135,7 +135,7 @@ class InboxCmp implements OnActivate { } -@Component({selector: 'drafts', templateUrl: 'drafts.html', directives: ROUTER_DIRECTIVES}) +@Component({selector: 'drafts', templateUrl: 'app/drafts.html', directives: ROUTER_DIRECTIVES}) class DraftsCmp { items: InboxRecord[] = []; ready: boolean = false; @@ -151,7 +151,7 @@ class DraftsCmp { @Component({ selector: 'inbox-app', providers: [DbService, ROUTER_PROVIDERS], - templateUrl: 'inbox-app.html', + templateUrl: 'app/inbox-app.html', directives: ROUTER_DIRECTIVES, }) @Routes([ diff --git a/modules/playground/src/alt_routing/inbox-detail.html b/modules/playground/src/alt_routing/app/inbox-detail.html similarity index 100% rename from modules/playground/src/alt_routing/inbox-detail.html rename to modules/playground/src/alt_routing/app/inbox-detail.html diff --git a/modules/playground/src/alt_routing/inbox.html b/modules/playground/src/alt_routing/app/inbox.html similarity index 100% rename from modules/playground/src/alt_routing/inbox.html rename to modules/playground/src/alt_routing/app/inbox.html diff --git a/modules/playground/src/alt_routing/index.html b/modules/playground/src/alt_routing/index.html index 0a925bf49e..f9d15c8609 100644 --- a/modules/playground/src/alt_routing/index.html +++ b/modules/playground/src/alt_routing/index.html @@ -3,12 +3,12 @@ Routing Example - + Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/alt_routing/index.ts b/modules/playground/src/alt_routing/index.ts index 577ab49134..c66b6a5054 100644 --- a/modules/playground/src/alt_routing/index.ts +++ b/modules/playground/src/alt_routing/index.ts @@ -1,8 +1,8 @@ -import {InboxApp} from './inbox-app'; -import {provide} from 'angular2/core'; -import {bootstrap} from 'angular2/platform/browser'; -import {HashLocationStrategy, LocationStrategy} from 'angular2/platform/common'; -import {ROUTER_PROVIDERS} from 'angular2/router'; +import {InboxApp} from './app/inbox-app'; +import {provide} from '@angular/core'; +import {bootstrap} from '@angular/platform-browser-dynamic'; +import {HashLocationStrategy, LocationStrategy} from '@angular/common'; +import {ROUTER_PROVIDERS} from '@angular/router'; export function main() { bootstrap(InboxApp, diff --git a/modules/playground/src/animate/animate-app.ts b/modules/playground/src/animate/app/animate-app.ts similarity index 100% rename from modules/playground/src/animate/animate-app.ts rename to modules/playground/src/animate/app/animate-app.ts diff --git a/modules/playground/src/animate/index.html b/modules/playground/src/animate/index.html index fc3f467a00..7e0d0b1467 100644 --- a/modules/playground/src/animate/index.html +++ b/modules/playground/src/animate/index.html @@ -4,6 +4,6 @@ Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/animate/index.ts b/modules/playground/src/animate/index.ts index cfc41ebe1d..d3a649e9de 100644 --- a/modules/playground/src/animate/index.ts +++ b/modules/playground/src/animate/index.ts @@ -1,5 +1,5 @@ -import {AnimateApp} from './animate-app'; -import {bootstrap} from '@angular/platform-browser'; +import {AnimateApp} from './app/animate-app'; +import {bootstrap} from '@angular/platform-browser-dynamic'; export function main() { bootstrap(AnimateApp); diff --git a/modules/playground/src/async/index.html b/modules/playground/src/async/index.html index 48c6660e32..64f40da63a 100644 --- a/modules/playground/src/async/index.html +++ b/modules/playground/src/async/index.html @@ -9,6 +9,6 @@ Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/async/index.ts b/modules/playground/src/async/index.ts index 432fe95a88..8ce66800b6 100644 --- a/modules/playground/src/async/index.ts +++ b/modules/playground/src/async/index.ts @@ -1,7 +1,7 @@ -import {bootstrap} from '@angular/platform-browser'; +import {bootstrap} from '@angular/platform-browser-dynamic'; import {Component} from '@angular/core'; import {NgIf} from '@angular/common'; -import {TimerWrapper} from '@angular/facade'; +import {TimerWrapper} from '@angular/core/src/facade/async'; @Component({ selector: 'async-app', diff --git a/modules/playground/src/bootstrap.ts b/modules/playground/src/bootstrap.ts new file mode 100644 index 0000000000..f47d8060d1 --- /dev/null +++ b/modules/playground/src/bootstrap.ts @@ -0,0 +1,95 @@ +declare var System: any; + + +(function(global) { + + writeScriptTag('/all/playground/vendor/es6-shim.js'); + writeScriptTag('/all/playground/vendor/zone.js'); + writeScriptTag('/all/playground/vendor/long-stack-trace-zone.js'); + writeScriptTag('/all/playground/vendor/system.src.js'); + writeScriptTag('/all/playground/vendor/Reflect.js'); + writeScriptTag('/all/playground/vendor/Rx.js', 'playgroundBootstrap()'); + global.playgroundBootstrap = playgroundBootstrap; + + + + //////// + function playgroundBootstrap() { + // check query param + var useBundles = location.search.indexOf('bundles=false') == -1; + if (useBundles) { + System.config({ + map: { + 'index': 'index.js', + '@angular/core': '/packages-dist/core/core.umd.js', + '@angular/common': '/packages-dist/common/common.umd.js', + '@angular/compiler': '/packages-dist/compiler/compiler.umd.js', + '@angular/platform-browser': '/packages-dist/platform-browser/platform-browser.umd.js', + '@angular/platform-browser-dynamic': '/packages-dist/platform-browser-dynamic/platform-browser-dynamic.umd.js', + '@angular/http': '/packages-dist/http/http.umd.js', + '@angular/upgrade': '/packages-dist/upgrade/upgrade.umd.js', + '@angular/router': '/packages-dist/router/router.umd.js', + '@angular/core/src/facade': '/all/@angular/core/src/facade', + 'rxjs': location.pathname.replace(/index\.html$/, '') + 'rxjs' + }, + packages: { + 'app': { + defaultExtension: 'js' + }, + '@angular/core/src/facade': { + defaultExtension: 'js' + } + } + }); + } else { + console.warn("Not using the Angular bundles. Don't use this configuration for e2e/performance tests!"); + + System.config({ + map: { + 'index': 'index.js', + '@angular': '/all/@angular' + }, + packages: { + // 'app': { + // main: 'index.js', + // defaultExtension: 'js' + // }, + '@angular/core': { + main: 'index.js', + defaultExtension: 'js' + }, + '@angular/compiler': { + main: 'index.js', + defaultExtension: 'js' + }, + '@angular/common': { + main: 'index.js', + defaultExtension: 'js' + }, + '@angular/platform-browser': { + main: 'index.js', + defaultExtension: 'js' + }, + '@angular/platform-browser-dynamic': { + main: 'index.js', + defaultExtension: 'js' + } + // 'rxjs': { + // defaultExtension: 'js' + // } + } + }); + } + + + // BOOTSTRAP the app! + System.import('index').then(function (m) { + m.main(); + }, console.error.bind(console)); + } + + + function writeScriptTag(scriptUrl, onload?) { + document.write(``); + } +}(window)); diff --git a/modules/playground/src/gestures/index.html b/modules/playground/src/gestures/index.html index 2b9bcebff8..72232d30f9 100644 --- a/modules/playground/src/gestures/index.html +++ b/modules/playground/src/gestures/index.html @@ -27,6 +27,6 @@ !function(a,b,c,d){"use strict";function e(a,b,c){return setTimeout(k(a,c),b)}function f(a,b,c){return Array.isArray(a)?(g(a,c[b],c),!0):!1}function g(a,b,c){var e;if(a)if(a.forEach)a.forEach(b,c);else if(a.length!==d)for(e=0;e-1}function r(a){return a.trim().split(/\s+/g)}function s(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;dc[b]}):d.sort()),d}function v(a,b){for(var c,e,f=b[0].toUpperCase()+b.slice(1),g=0;g1&&!c.firstMultiple?c.firstMultiple=E(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=F(d);b.timeStamp=nb(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=J(h,i),b.distance=I(h,i),C(c,b),b.offsetDirection=H(b.deltaX,b.deltaY),b.scale=g?L(g.pointers,d):1,b.rotation=g?K(g.pointers,d):0,D(c,b);var j=a.element;p(b.srcEvent.target,j)&&(j=b.srcEvent.target),b.target=j}function C(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};(b.eventType===yb||f.eventType===Ab)&&(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function D(a,b){var c,e,f,g,h=a.lastInterval||b,i=b.timeStamp-h.timeStamp;if(b.eventType!=Bb&&(i>xb||h.velocity===d)){var j=h.deltaX-b.deltaX,k=h.deltaY-b.deltaY,l=G(i,j,k);e=l.x,f=l.y,c=mb(l.x)>mb(l.y)?l.x:l.y,g=H(j,k),a.lastInterval=b}else c=h.velocity,e=h.velocityX,f=h.velocityY,g=h.direction;b.velocity=c,b.velocityX=e,b.velocityY=f,b.direction=g}function E(a){for(var b=[],c=0;ce;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:lb(c/b),y:lb(d/b)}}function G(a,b,c){return{x:b/a||0,y:c/a||0}}function H(a,b){return a===b?Cb:mb(a)>=mb(b)?a>0?Db:Eb:b>0?Fb:Gb}function I(a,b,c){c||(c=Kb);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function J(a,b,c){c||(c=Kb);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function K(a,b){return J(b[1],b[0],Lb)-J(a[1],a[0],Lb)}function L(a,b){return I(b[0],b[1],Lb)/I(a[0],a[1],Lb)}function M(){this.evEl=Nb,this.evWin=Ob,this.allow=!0,this.pressed=!1,y.apply(this,arguments)}function N(){this.evEl=Rb,this.evWin=Sb,y.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function O(){this.evTarget=Ub,this.evWin=Vb,this.started=!1,y.apply(this,arguments)}function P(a,b){var c=t(a.touches),d=t(a.changedTouches);return b&(Ab|Bb)&&(c=u(c.concat(d),"identifier",!0)),[c,d]}function Q(){this.evTarget=Xb,this.targetIds={},y.apply(this,arguments)}function R(a,b){var c=t(a.touches),d=this.targetIds;if(b&(yb|zb)&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=t(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){return p(a.target,i)}),b===yb)for(e=0;eh&&(b.push(a),h=b.length-1):e&(Ab|Bb)&&(c=!0),0>h||(b[h]=a,this.callback(this.manager,e,{pointers:b,changedPointers:[a],pointerType:f,srcEvent:a}),c&&b.splice(h,1))}});var Tb={touchstart:yb,touchmove:zb,touchend:Ab,touchcancel:Bb},Ub="touchstart",Vb="touchstart touchmove touchend touchcancel";j(O,y,{handler:function(a){var b=Tb[a.type];if(b===yb&&(this.started=!0),this.started){var c=P.call(this,a,b);b&(Ab|Bb)&&c[0].length-c[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:tb,srcEvent:a})}}});var Wb={touchstart:yb,touchmove:zb,touchend:Ab,touchcancel:Bb},Xb="touchstart touchmove touchend touchcancel";j(Q,y,{handler:function(a){var b=Wb[a.type],c=R.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:tb,srcEvent:a})}}),j(S,y,{handler:function(a,b,c){var d=c.pointerType==tb,e=c.pointerType==vb;if(d)this.mouse.allow=!1;else if(e&&!this.mouse.allow)return;b&(Ab|Bb)&&(this.mouse.allow=!0),this.callback(a,b,c)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Yb=v(jb.style,"touchAction"),Zb=Yb!==d,$b="compute",_b="auto",ac="manipulation",bc="none",cc="pan-x",dc="pan-y";T.prototype={set:function(a){a==$b&&(a=this.compute()),Zb&&this.manager.element.style&&(this.manager.element.style[Yb]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];return g(this.manager.recognizers,function(b){l(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))}),U(a.join(" "))},preventDefaults:function(a){if(!Zb){var b=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented)return void b.preventDefault();var d=this.actions,e=q(d,bc),f=q(d,dc),g=q(d,cc);return e||f&&c&Hb||g&&c&Ib?this.preventSrc(b):void 0}},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}};var ec=1,fc=2,gc=4,hc=8,ic=hc,jc=16,kc=32;V.prototype={defaults:{},set:function(a){return h(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(f(a,"recognizeWith",this))return this;var b=this.simultaneous;return a=Y(a,this),b[a.id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){return f(a,"dropRecognizeWith",this)?this:(a=Y(a,this),delete this.simultaneous[a.id],this)},requireFailure:function(a){if(f(a,"requireFailure",this))return this;var b=this.requireFail;return a=Y(a,this),-1===s(b,a)&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(f(a,"dropRequireFailure",this))return this;a=Y(a,this);var b=s(this.requireFail,a);return b>-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function b(b){c.manager.emit(c.options.event+(b?W(d):""),a)}var c=this,d=this.state;hc>d&&b(!0),b(),d>=hc&&b(!0)},tryEmit:function(a){return this.canEmit()?this.emit(a):void(this.state=kc)},canEmit:function(){for(var a=0;af?Db:Eb,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?Cb:0>g?Fb:Gb,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){return Z.prototype.attrTest.call(this,a)&&(this.state&fc||!(this.state&fc)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=X(a.direction);b&&this.manager.emit(this.options.event+b,a),this._super.emit.call(this,a)}}),j(_,Z,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[bc]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&fc)},emit:function(a){if(this._super.emit.call(this,a),1!==a.scale){var b=a.scale<1?"in":"out";this.manager.emit(this.options.event+b,a)}}}),j(ab,V,{defaults:{event:"press",pointers:1,time:500,threshold:5},getTouchAction:function(){return[_b]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distanceb.time;if(this._input=a,!d||!c||a.eventType&(Ab|Bb)&&!f)this.reset();else if(a.eventType&yb)this.reset(),this._timer=e(function(){this.state=ic,this.tryEmit()},b.time,this);else if(a.eventType&Ab)return ic;return kc},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===ic&&(a&&a.eventType&Ab?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=nb(),this.manager.emit(this.options.event,this._input)))}}),j(bb,Z,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[bc]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&fc)}}),j(cb,Z,{defaults:{event:"swipe",threshold:10,velocity:.65,direction:Hb|Ib,pointers:1},getTouchAction:function(){return $.prototype.getTouchAction.call(this)},attrTest:function(a){var b,c=this.options.direction;return c&(Hb|Ib)?b=a.velocity:c&Hb?b=a.velocityX:c&Ib&&(b=a.velocityY),this._super.attrTest.call(this,a)&&c&a.direction&&a.distance>this.options.threshold&&mb(b)>this.options.velocity&&a.eventType&Ab},emit:function(a){var b=X(a.direction);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),j(db,V,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:2,posThreshold:10},getTouchAction:function(){return[ac]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance - $SCRIPTS$ + diff --git a/modules/playground/src/gestures/index.ts b/modules/playground/src/gestures/index.ts index 5c8daf3029..3beffe750b 100644 --- a/modules/playground/src/gestures/index.ts +++ b/modules/playground/src/gestures/index.ts @@ -1,4 +1,4 @@ -import {bootstrap} from '@angular/platform-browser'; +import {bootstrap} from '@angular/platform-browser-dynamic'; import {Component} from '@angular/core'; @Component({selector: 'gestures-app', templateUrl: 'template.html'}) diff --git a/modules/playground/src/hash_routing/index.html b/modules/playground/src/hash_routing/index.html index f3a908da15..36cc7e8f4e 100644 --- a/modules/playground/src/hash_routing/index.html +++ b/modules/playground/src/hash_routing/index.html @@ -1,12 +1,12 @@ Routing Example - + Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/hash_routing/index.ts b/modules/playground/src/hash_routing/index.ts index 70b12c3606..c6081f2748 100644 --- a/modules/playground/src/hash_routing/index.ts +++ b/modules/playground/src/hash_routing/index.ts @@ -1,5 +1,5 @@ import {Component, provide} from '@angular/core'; -import {bootstrap} from '@angular/platform-browser'; +import {bootstrap} from '@angular/platform-browser-dynamic'; import {RouteConfig, Route, ROUTER_PROVIDERS, ROUTER_DIRECTIVES} from '@angular/router'; import {HashLocationStrategy, LocationStrategy} from '@angular/common'; diff --git a/modules/playground/src/hello_world/index.html b/modules/playground/src/hello_world/index.html index 1e6008f42b..cc79403991 100644 --- a/modules/playground/src/hello_world/index.html +++ b/modules/playground/src/hello_world/index.html @@ -1,11 +1,11 @@ Hello Angular 2.0 - + Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/hello_world/index.ts b/modules/playground/src/hello_world/index.ts index 0c2e2bfaff..1d68bfc1a9 100644 --- a/modules/playground/src/hello_world/index.ts +++ b/modules/playground/src/hello_world/index.ts @@ -1,4 +1,4 @@ -import {bootstrap} from '@angular/platform-browser'; +import {bootstrap} from '@angular/platform-browser-dynamic'; import {Renderer, ElementRef, Component, Directive, Injectable} from '@angular/core'; export function main() { diff --git a/modules/playground/src/http/http_comp.ts b/modules/playground/src/http/app/http_comp.ts similarity index 90% rename from modules/playground/src/http/http_comp.ts rename to modules/playground/src/http/app/http_comp.ts index 7fdad968e4..bc7c39af48 100644 --- a/modules/playground/src/http/http_comp.ts +++ b/modules/playground/src/http/app/http_comp.ts @@ -1,5 +1,5 @@ import {Component} from '@angular/core'; -import {Http, Response} from '@angular/http/http'; +import {Http, Response} from '@angular/http'; import 'rxjs/add/operator/map'; @Component({ diff --git a/modules/playground/src/http/index.html b/modules/playground/src/http/index.html index 69d910f0d4..fa19f65ec4 100644 --- a/modules/playground/src/http/index.html +++ b/modules/playground/src/http/index.html @@ -6,6 +6,6 @@ Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/http/index.ts b/modules/playground/src/http/index.ts index 7e7f1981d0..320586d4cd 100644 --- a/modules/playground/src/http/index.ts +++ b/modules/playground/src/http/index.ts @@ -1,6 +1,6 @@ -import {bootstrap} from '@angular/platform-browser'; -import {HTTP_PROVIDERS} from '@angular/http/http'; -import {HttpCmp} from './http_comp'; +import {bootstrap} from '@angular/platform-browser-dynamic'; +import {HTTP_PROVIDERS} from '@angular/http'; +import {HttpCmp} from './app/http_comp'; export function main() { bootstrap(HttpCmp, [HTTP_PROVIDERS]); diff --git a/modules/playground/src/jsonp/jsonp_comp.ts b/modules/playground/src/jsonp/app/jsonp_comp.ts similarity index 80% rename from modules/playground/src/jsonp/jsonp_comp.ts rename to modules/playground/src/jsonp/app/jsonp_comp.ts index 9c0f5ef7d8..b165393d80 100644 --- a/modules/playground/src/jsonp/jsonp_comp.ts +++ b/modules/playground/src/jsonp/app/jsonp_comp.ts @@ -1,6 +1,5 @@ import {Component} from '@angular/core'; -import {Jsonp, Response} from '@angular/http/http'; -import {ObservableWrapper} from '@angular/facade'; +import {Jsonp} from '@angular/http'; @Component({ selector: 'jsonp-app', diff --git a/modules/playground/src/jsonp/index.html b/modules/playground/src/jsonp/index.html index e2ec5c6696..e4fadcf643 100644 --- a/modules/playground/src/jsonp/index.html +++ b/modules/playground/src/jsonp/index.html @@ -6,6 +6,6 @@ Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/jsonp/index.ts b/modules/playground/src/jsonp/index.ts index dcb7059da8..42d5e43801 100644 --- a/modules/playground/src/jsonp/index.ts +++ b/modules/playground/src/jsonp/index.ts @@ -1,6 +1,6 @@ -import {bootstrap} from '@angular/platform-browser'; -import {JSONP_PROVIDERS} from '@angular/http/http'; -import {JsonpCmp} from './jsonp_comp'; +import {bootstrap} from '@angular/platform-browser-dynamic'; +import {JSONP_PROVIDERS} from '@angular/http'; +import {JsonpCmp} from './app/jsonp_comp'; export function main() { bootstrap(JsonpCmp, [JSONP_PROVIDERS]); diff --git a/modules/playground/src/key_events/index.html b/modules/playground/src/key_events/index.html index fbceec8090..70b7f5fc43 100644 --- a/modules/playground/src/key_events/index.html +++ b/modules/playground/src/key_events/index.html @@ -21,6 +21,6 @@ Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/key_events/index.ts b/modules/playground/src/key_events/index.ts index e380beaccd..9bec7bfa96 100644 --- a/modules/playground/src/key_events/index.ts +++ b/modules/playground/src/key_events/index.ts @@ -1,4 +1,4 @@ -import {bootstrap} from '@angular/platform-browser'; +import {bootstrap} from '@angular/platform-browser-dynamic'; import {Component} from '@angular/core'; import {KeyEventsPlugin} from '@angular/platform-browser/src/dom/events/key_events'; diff --git a/modules/playground/src/model_driven_forms/index.html b/modules/playground/src/model_driven_forms/index.html index 54f575abc2..439a2f36f7 100644 --- a/modules/playground/src/model_driven_forms/index.html +++ b/modules/playground/src/model_driven_forms/index.html @@ -14,6 +14,6 @@ Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/model_driven_forms/index.ts b/modules/playground/src/model_driven_forms/index.ts index 9611e670f7..e3e6c9e353 100644 --- a/modules/playground/src/model_driven_forms/index.ts +++ b/modules/playground/src/model_driven_forms/index.ts @@ -1,8 +1,7 @@ -import {bootstrap} from '@angular/platform-browser'; +import {bootstrap} from '@angular/platform-browser-dynamic'; import { FORM_DIRECTIVES, ControlGroup, - NgControl, Validators, NgFormModel, FormBuilder, @@ -11,7 +10,7 @@ import { } from '@angular/common'; import {Component, Directive, Host} from '@angular/core'; -import {RegExpWrapper, print, isPresent} from '@angular/facade'; +import {RegExpWrapper, print, isPresent} from '@angular/core/src/facade/lang'; import {AbstractControl} from '@angular/common'; /** diff --git a/modules/playground/src/order_management/index.html b/modules/playground/src/order_management/index.html index 5b733f29cc..52098d69d0 100644 --- a/modules/playground/src/order_management/index.html +++ b/modules/playground/src/order_management/index.html @@ -14,6 +14,6 @@ Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/order_management/index.ts b/modules/playground/src/order_management/index.ts index ebcf339b05..8446596842 100644 --- a/modules/playground/src/order_management/index.ts +++ b/modules/playground/src/order_management/index.ts @@ -1,4 +1,4 @@ -import {bootstrap} from '@angular/platform-browser'; +import {bootstrap} from '@angular/platform-browser-dynamic'; import { Component, Directive, @@ -12,7 +12,7 @@ import { } from '@angular/core'; import {NgIf, NgFor, FORM_DIRECTIVES} from '@angular/common'; -import {ListWrapper} from '@angular/facade'; +import {ListWrapper} from '@angular/core/src/facade/collection'; /** * You can find the Angular 1 implementation of this example here: diff --git a/modules/playground/src/person_management/index.html b/modules/playground/src/person_management/index.html index 70630d911e..905b2b2577 100644 --- a/modules/playground/src/person_management/index.html +++ b/modules/playground/src/person_management/index.html @@ -14,6 +14,6 @@ Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/relative_assets/my_cmp/my_cmp.dart b/modules/playground/src/relative_assets/app/my_cmp.dart similarity index 100% rename from modules/playground/src/relative_assets/my_cmp/my_cmp.dart rename to modules/playground/src/relative_assets/app/my_cmp.dart diff --git a/modules/playground/src/relative_assets/my_cmp/my_cmp.ts b/modules/playground/src/relative_assets/app/my_cmp.ts similarity index 100% rename from modules/playground/src/relative_assets/my_cmp/my_cmp.ts rename to modules/playground/src/relative_assets/app/my_cmp.ts diff --git a/modules/playground/src/relative_assets/my_cmp/style.css b/modules/playground/src/relative_assets/app/style.css similarity index 100% rename from modules/playground/src/relative_assets/my_cmp/style.css rename to modules/playground/src/relative_assets/app/style.css diff --git a/modules/playground/src/relative_assets/my_cmp/tpl.html b/modules/playground/src/relative_assets/app/tpl.html similarity index 100% rename from modules/playground/src/relative_assets/my_cmp/tpl.html rename to modules/playground/src/relative_assets/app/tpl.html diff --git a/modules/playground/src/relative_assets/index.html b/modules/playground/src/relative_assets/index.html index 0420c19883..20bd353c1f 100644 --- a/modules/playground/src/relative_assets/index.html +++ b/modules/playground/src/relative_assets/index.html @@ -6,6 +6,6 @@ Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/relative_assets/index.ts b/modules/playground/src/relative_assets/index.ts index b656dac200..faee2e91b0 100644 --- a/modules/playground/src/relative_assets/index.ts +++ b/modules/playground/src/relative_assets/index.ts @@ -1,7 +1,7 @@ -import {bootstrap} from '@angular/platform-browser'; +import {bootstrap} from '@angular/platform-browser-dynamic'; import {Renderer, ElementRef, Component, Directive, Injectable} from '@angular/core'; -import {MyCmp} from './my_cmp/my_cmp'; +import {MyCmp} from './app/my_cmp'; export function main() { bootstrap(RelativeApp); diff --git a/modules/playground/src/routing/data.ts b/modules/playground/src/routing/app/data.ts similarity index 100% rename from modules/playground/src/routing/data.ts rename to modules/playground/src/routing/app/data.ts diff --git a/modules/playground/src/routing/drafts.html b/modules/playground/src/routing/app/drafts.html similarity index 100% rename from modules/playground/src/routing/drafts.html rename to modules/playground/src/routing/app/drafts.html diff --git a/modules/playground/src/routing/inbox-app.html b/modules/playground/src/routing/app/inbox-app.html similarity index 100% rename from modules/playground/src/routing/inbox-app.html rename to modules/playground/src/routing/app/inbox-app.html diff --git a/modules/playground/src/routing/inbox-app.ts b/modules/playground/src/routing/app/inbox-app.ts similarity index 90% rename from modules/playground/src/routing/inbox-app.ts rename to modules/playground/src/routing/app/inbox-app.ts index 758f8ea81c..ce923808eb 100644 --- a/modules/playground/src/routing/inbox-app.ts +++ b/modules/playground/src/routing/app/inbox-app.ts @@ -2,9 +2,8 @@ import {Component, Injectable} from '@angular/core'; import {RouterLink, RouteConfig, Router, Route, RouterOutlet, RouteParams} from '@angular/router'; import * as db from './data'; import {Location} from '@angular/common'; -import {PromiseWrapper} from '@angular/facade'; -import {isPresent, DateWrapper} from '@angular/facade'; -import {PromiseCompleter} from '@angular/facade'; +import {PromiseWrapper, PromiseCompleter} from '@angular/core/src/facade/async'; +import {isPresent, DateWrapper} from '@angular/core/src/facade/lang'; class InboxRecord { id: string = ''; @@ -82,7 +81,7 @@ class DbService { } } -@Component({selector: 'inbox-detail', directives: [RouterLink], templateUrl: 'inbox-detail.html'}) +@Component({selector: 'inbox-detail', directives: [RouterLink], templateUrl: 'app/inbox-detail.html'}) class InboxDetailCmp { record: InboxRecord = new InboxRecord(); ready: boolean = false; @@ -93,7 +92,7 @@ class InboxDetailCmp { } } -@Component({selector: 'inbox', templateUrl: 'inbox.html', directives: [RouterLink]}) +@Component({selector: 'inbox', templateUrl: 'app/inbox.html', directives: [RouterLink]}) class InboxCmp { items: InboxRecord[] = []; ready: boolean = false; @@ -118,7 +117,7 @@ class InboxCmp { } -@Component({selector: 'drafts', templateUrl: 'drafts.html', directives: [RouterLink]}) +@Component({selector: 'drafts', templateUrl: 'app/drafts.html', directives: [RouterLink]}) class DraftsCmp { items: InboxRecord[] = []; ready: boolean = false; @@ -134,7 +133,7 @@ class DraftsCmp { @Component({ selector: 'inbox-app', viewProviders: [DbService], - templateUrl: 'inbox-app.html', + templateUrl: 'app/inbox-app.html', directives: [RouterOutlet, RouterLink] }) @RouteConfig([ diff --git a/modules/playground/src/routing/inbox-detail.html b/modules/playground/src/routing/app/inbox-detail.html similarity index 100% rename from modules/playground/src/routing/inbox-detail.html rename to modules/playground/src/routing/app/inbox-detail.html diff --git a/modules/playground/src/routing/inbox.html b/modules/playground/src/routing/app/inbox.html similarity index 100% rename from modules/playground/src/routing/inbox.html rename to modules/playground/src/routing/app/inbox.html diff --git a/modules/playground/src/routing/index.html b/modules/playground/src/routing/index.html index 2349f350d4..cf4aa80e1f 100644 --- a/modules/playground/src/routing/index.html +++ b/modules/playground/src/routing/index.html @@ -3,12 +3,12 @@ Routing Example - + Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/routing/index.ts b/modules/playground/src/routing/index.ts index 256cee4715..c66b6a5054 100644 --- a/modules/playground/src/routing/index.ts +++ b/modules/playground/src/routing/index.ts @@ -1,6 +1,6 @@ -import {InboxApp} from './inbox-app'; +import {InboxApp} from './app/inbox-app'; import {provide} from '@angular/core'; -import {bootstrap} from '@angular/platform-browser'; +import {bootstrap} from '@angular/platform-browser-dynamic'; import {HashLocationStrategy, LocationStrategy} from '@angular/common'; import {ROUTER_PROVIDERS} from '@angular/router'; diff --git a/modules/playground/src/sourcemap/index.html b/modules/playground/src/sourcemap/index.html index c8b981108e..d1981b2a7e 100644 --- a/modules/playground/src/sourcemap/index.html +++ b/modules/playground/src/sourcemap/index.html @@ -11,6 +11,6 @@ via source maps!

- $SCRIPTS$ + diff --git a/modules/playground/src/sourcemap/index.ts b/modules/playground/src/sourcemap/index.ts index 8003ed59d2..891928062f 100644 --- a/modules/playground/src/sourcemap/index.ts +++ b/modules/playground/src/sourcemap/index.ts @@ -1,5 +1,5 @@ -import {BaseException, WrappedException} from '@angular/facade'; -import {bootstrap} from '@angular/platform-browser'; +import {BaseException} from '@angular/core/src/facade/exceptions'; +import {bootstrap} from '@angular/platform-browser-dynamic'; import {Component} from '@angular/core'; @Component({ diff --git a/modules/playground/src/svg/index.html b/modules/playground/src/svg/index.html index 9b2f3abd40..f74683b943 100644 --- a/modules/playground/src/svg/index.html +++ b/modules/playground/src/svg/index.html @@ -5,6 +5,6 @@ Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/svg/index.ts b/modules/playground/src/svg/index.ts index 0129981a24..3cc6e60b2f 100644 --- a/modules/playground/src/svg/index.ts +++ b/modules/playground/src/svg/index.ts @@ -1,4 +1,4 @@ -import {bootstrap} from '@angular/platform-browser'; +import {bootstrap} from '@angular/platform-browser-dynamic'; import {Component} from '@angular/core'; @Component({selector: '[svg-group]', template: `Hello`}) diff --git a/modules/playground/src/template_driven_forms/index.html b/modules/playground/src/template_driven_forms/index.html index 79ca5b3efb..19eb778b98 100644 --- a/modules/playground/src/template_driven_forms/index.html +++ b/modules/playground/src/template_driven_forms/index.html @@ -14,6 +14,6 @@ Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/template_driven_forms/index.ts b/modules/playground/src/template_driven_forms/index.ts index 961df3bac6..1503404109 100644 --- a/modules/playground/src/template_driven_forms/index.ts +++ b/modules/playground/src/template_driven_forms/index.ts @@ -1,5 +1,5 @@ import {bootstrap} from '@angular/platform-browser-dynamic'; -import {Component, Directive, Host, forwardRef, Provider} from '@angular/core'; +import {Component, Directive, Host} from '@angular/core'; import { ControlGroup, NgIf, @@ -11,7 +11,7 @@ import { NgForm } from '@angular/common'; -import {RegExpWrapper, print, isPresent} from '@angular/facade'; +import {RegExpWrapper, print, isPresent} from '@angular/core/src/facade/lang'; /** * A domain model we are binding the form controls to. diff --git a/modules/playground/src/todo/services/TodoStore.ts b/modules/playground/src/todo/app/TodoStore.ts similarity index 93% rename from modules/playground/src/todo/services/TodoStore.ts rename to modules/playground/src/todo/app/TodoStore.ts index fc5def09e9..217d6f239c 100644 --- a/modules/playground/src/todo/services/TodoStore.ts +++ b/modules/playground/src/todo/app/TodoStore.ts @@ -1,5 +1,5 @@ import {Injectable} from '@angular/core'; -import {ListWrapper, Predicate} from '@angular/facade'; +import {ListWrapper, Predicate} from '@angular/core/src/facade/collection'; // base model for RecordStore export abstract class KeyModel { diff --git a/modules/playground/src/todo/index.html b/modules/playground/src/todo/index.html index a7e935cb7b..8bbefbc0bf 100644 --- a/modules/playground/src/todo/index.html +++ b/modules/playground/src/todo/index.html @@ -1,13 +1,14 @@ - + Todo Angular 2 + Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/todo/index.ts b/modules/playground/src/todo/index.ts index aa83fbae22..2b3163639d 100644 --- a/modules/playground/src/todo/index.ts +++ b/modules/playground/src/todo/index.ts @@ -1,7 +1,7 @@ -import {bootstrap} from '@angular/platform-browser'; +import {bootstrap} from '@angular/platform-browser-dynamic'; import {Component} from '@angular/core'; import {NgFor} from '@angular/common'; -import {Store, Todo, TodoFactory} from './services/TodoStore'; +import {Store, Todo, TodoFactory} from './app/TodoStore'; @Component({ selector: 'todo-app', diff --git a/modules/playground/src/upgrade/index.html b/modules/playground/src/upgrade/index.html index 5fc3e8f5c7..9b3d0f8cf7 100644 --- a/modules/playground/src/upgrade/index.html +++ b/modules/playground/src/upgrade/index.html @@ -16,7 +16,7 @@
Greetings from {{name}}! - - $SCRIPTS$ + + diff --git a/modules/playground/src/web_workers/images/index.html b/modules/playground/src/web_workers/images/index.html index 29f3fdb535..68736e91b7 100644 --- a/modules/playground/src/web_workers/images/index.html +++ b/modules/playground/src/web_workers/images/index.html @@ -7,7 +7,7 @@ - $SCRIPTS$ + diff --git a/modules/playground/src/web_workers/images/index_common.ts b/modules/playground/src/web_workers/images/index_common.ts index d30fda899e..0a11eef5bc 100644 --- a/modules/playground/src/web_workers/images/index_common.ts +++ b/modules/playground/src/web_workers/images/index_common.ts @@ -1,8 +1,9 @@ import {Component} from '@angular/core'; +import {EventListener} from '@angular/core/src/facade/browser'; +import {TimerWrapper} from '@angular/core/src/facade/async'; import {BitmapService} from './services/bitmap'; -import {EventListener} from '@angular/facade'; import {FileReader, Uint8ArrayWrapper} from './file_api'; -import {TimerWrapper} from '@angular/facade'; + @Component({selector: 'image-demo', viewProviders: [BitmapService], templateUrl: 'image_demo.html'}) export class ImageDemo { diff --git a/modules/playground/src/web_workers/images/single_thread.html b/modules/playground/src/web_workers/images/single_thread.html index dc9f33dcb2..8facb87385 100644 --- a/modules/playground/src/web_workers/images/single_thread.html +++ b/modules/playground/src/web_workers/images/single_thread.html @@ -8,7 +8,7 @@ - $SCRIPTS$ + diff --git a/modules/playground/src/web_workers/images/single_thread.ts b/modules/playground/src/web_workers/images/single_thread.ts index dd692c1b57..df5a09f733 100644 --- a/modules/playground/src/web_workers/images/single_thread.ts +++ b/modules/playground/src/web_workers/images/single_thread.ts @@ -1,4 +1,4 @@ -import {bootstrap} from '@angular/platform-browser'; +import {bootstrap} from '@angular/platform-browser-dynamic'; import {ImageDemo} from './index_common'; export function main() { diff --git a/modules/playground/src/web_workers/input/index.html b/modules/playground/src/web_workers/input/index.html index cca8f50fa6..80dfbcbc72 100644 --- a/modules/playground/src/web_workers/input/index.html +++ b/modules/playground/src/web_workers/input/index.html @@ -8,6 +8,6 @@ Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/web_workers/kitchen_sink/index.html b/modules/playground/src/web_workers/kitchen_sink/index.html index 89898234f1..c4846f8fe4 100644 --- a/modules/playground/src/web_workers/kitchen_sink/index.html +++ b/modules/playground/src/web_workers/kitchen_sink/index.html @@ -21,6 +21,6 @@ Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/web_workers/kitchen_sink/index_common.ts b/modules/playground/src/web_workers/kitchen_sink/index_common.ts index 57288cead9..79d8901278 100644 --- a/modules/playground/src/web_workers/kitchen_sink/index_common.ts +++ b/modules/playground/src/web_workers/kitchen_sink/index_common.ts @@ -1,5 +1,5 @@ import {Renderer, ElementRef, Component, Directive, Injectable} from '@angular/core'; -import {StringWrapper} from '@angular/facade'; +import {StringWrapper} from '@angular/core/src/facade/lang'; // A service available to the Injector, used by the HelloCmp component. @Injectable() diff --git a/modules/playground/src/web_workers/message_broker/index.html b/modules/playground/src/web_workers/message_broker/index.html index dd783c3968..40450e78dd 100644 --- a/modules/playground/src/web_workers/message_broker/index.html +++ b/modules/playground/src/web_workers/message_broker/index.html @@ -7,6 +7,6 @@

- $SCRIPTS$ + diff --git a/modules/playground/src/web_workers/message_broker/index_common.ts b/modules/playground/src/web_workers/message_broker/index_common.ts index 7707d87b02..925864d625 100644 --- a/modules/playground/src/web_workers/message_broker/index_common.ts +++ b/modules/playground/src/web_workers/message_broker/index_common.ts @@ -1,9 +1,9 @@ -import {PromiseWrapper} from '@angular/facade'; +import {PromiseWrapper} from '@angular/core/src/facade/async'; import {Component} from '@angular/core'; import { ServiceMessageBrokerFactory, PRIMITIVE -} from '../../../../@angular/platform-browser/src/worker_app'; +} from '@angular/platform-browser/src/worker_app';; const ECHO_CHANNEL = "ECHO"; diff --git a/modules/playground/src/web_workers/router/index.html b/modules/playground/src/web_workers/router/index.html index df9f7a9a3c..36d69ed15f 100644 --- a/modules/playground/src/web_workers/router/index.html +++ b/modules/playground/src/web_workers/router/index.html @@ -3,6 +3,6 @@ Web Worker Router Example - $SCRIPTS$ + diff --git a/modules/playground/src/web_workers/todo/index.html b/modules/playground/src/web_workers/todo/index.html index a52efc9238..0559e7fa49 100644 --- a/modules/playground/src/web_workers/todo/index.html +++ b/modules/playground/src/web_workers/todo/index.html @@ -8,6 +8,6 @@ - $SCRIPTS$ + diff --git a/modules/playground/src/web_workers/todo/index_web_socket.html b/modules/playground/src/web_workers/todo/index_web_socket.html index a52efc9238..81ffe3fc4d 100644 --- a/modules/playground/src/web_workers/todo/index_web_socket.html +++ b/modules/playground/src/web_workers/todo/index_web_socket.html @@ -8,6 +8,6 @@ - $SCRIPTS$ + diff --git a/modules/playground/src/web_workers/todo/services/TodoStore.ts b/modules/playground/src/web_workers/todo/services/TodoStore.ts index e178544643..b62fac3873 100644 --- a/modules/playground/src/web_workers/todo/services/TodoStore.ts +++ b/modules/playground/src/web_workers/todo/services/TodoStore.ts @@ -1,5 +1,5 @@ import {Injectable} from '@angular/core'; -import {ListWrapper, Predicate} from '@angular/facade'; +import {ListWrapper, Predicate} from '@angular/core/src/facade/collection'; // base model for RecordStore export class KeyModel { diff --git a/modules/playground/src/zippy_component/zippy.html b/modules/playground/src/zippy_component/app/zippy.html similarity index 100% rename from modules/playground/src/zippy_component/zippy.html rename to modules/playground/src/zippy_component/app/zippy.html diff --git a/modules/playground/src/zippy_component/zippy.ts b/modules/playground/src/zippy_component/app/zippy.ts similarity index 78% rename from modules/playground/src/zippy_component/zippy.ts rename to modules/playground/src/zippy_component/app/zippy.ts index 933003ed79..383d73dbc2 100644 --- a/modules/playground/src/zippy_component/zippy.ts +++ b/modules/playground/src/zippy_component/app/zippy.ts @@ -1,7 +1,7 @@ import {Component, EventEmitter, Input, Output} from '@angular/core'; -import {ObservableWrapper} from '@angular/facade'; +import {ObservableWrapper} from '@angular/core/src/facade/async'; -@Component({selector: 'zippy', templateUrl: 'zippy.html'}) +@Component({selector: 'zippy', templateUrl: 'app/zippy.html'}) export class Zippy { visible: boolean = true; @Input() title: string = ''; diff --git a/modules/playground/src/zippy_component/index.html b/modules/playground/src/zippy_component/index.html index 01b214421c..1873ff4396 100644 --- a/modules/playground/src/zippy_component/index.html +++ b/modules/playground/src/zippy_component/index.html @@ -6,6 +6,6 @@ Loading... - $SCRIPTS$ + diff --git a/modules/playground/src/zippy_component/index.ts b/modules/playground/src/zippy_component/index.ts index 720752a534..6423fcb430 100644 --- a/modules/playground/src/zippy_component/index.ts +++ b/modules/playground/src/zippy_component/index.ts @@ -1,6 +1,6 @@ -import {bootstrap} from '@angular/platform-browser'; +import {bootstrap} from '@angular/platform-browser-dynamic'; import {Component} from '@angular/core'; -import {Zippy} from './zippy'; +import {Zippy} from './app/zippy'; @Component({ selector: 'zippy-app', diff --git a/modules/tsconfig.json b/modules/tsconfig.json index d1907a5054..7142eca96b 100644 --- a/modules/tsconfig.json +++ b/modules/tsconfig.json @@ -26,7 +26,6 @@ "benchmarks_external", "benchpress", "payload_tests", - "playground", "rollup-test", "upgrade-ts2dart.d.ts", "zone-ts2dart.d.ts" diff --git a/protractor-js-new-world.conf.js b/protractor-js-new-world.conf.js new file mode 100644 index 0000000000..5dd7b7c260 --- /dev/null +++ b/protractor-js-new-world.conf.js @@ -0,0 +1,39 @@ +var BROWSER_OPTIONS = { + LocalChrome: { + 'browserName': 'chrome' + }, + ChromeOnTravis: { + browserName: 'chrome', + chromeOptions: { + 'args': ['--no-sandbox'], + 'binary': process.env.CHROME_BIN + } + } +}; + + + +exports.config = { + allScriptsTimeout: 11000, + specs: [ + 'dist/all/**/e2e_test/**/*_spec.js' + ], + exclude: [ + '**/alt_routing/**', // temporary package + '**/web_workers/**', // needs to be setup + '**/key_events/**', // can't tell why this is failing + '**/sourcemap/**' // fails only on travis + ], + capabilities: process.env.TRAVIS ? BROWSER_OPTIONS.ChromeOnTravis : BROWSER_OPTIONS.LocalChrome, + directConnect: true, + baseUrl: 'http://localhost:7777/', + framework: 'jasmine2', + jasmineNodeOpts: { + showColors: true, + defaultTimeoutInterval: 60000, + print: function(msg) { console.log(msg)} + }, + useAllAngular2AppRoots: true +}; + + diff --git a/protractor-js.conf.js b/protractor-js.conf.js index b032bfad2f..c73ad84d0f 100644 --- a/protractor-js.conf.js +++ b/protractor-js.conf.js @@ -2,7 +2,7 @@ var data = module.exports = require('./protractor-shared.js'); var config = data.config; config.baseUrl = 'http://localhost:8001/'; -// TODO: remove exclusion when JS verison of scrolling benchmark is available +// TODO: remove exclusion when JS version of scrolling benchmark is available config.exclude.push('dist/js/cjs/benchmarks_external/e2e_test/naive_infinite_scroll_spec.js'); config.exclude.push('dist/js/cjs/benchmarks_external/e2e_test/naive_infinite_scroll_perf.js'); diff --git a/scripts/ci-lite/install.sh b/scripts/ci-lite/install.sh index 29bcbdca1c..0789bbb450 100755 --- a/scripts/ci-lite/install.sh +++ b/scripts/ci-lite/install.sh @@ -39,7 +39,7 @@ echo 'travis_fold:end:install.node_modules' # Install Chromium echo 'travis_fold:start:install.chromium' -if [[ ${TRAVIS} && ${CI_MODE} == "js" ]]; then +if [[ ${CI_MODE} == "js" || ${CI_MODE} == "e2e" ]]; then ./scripts/ci/install_chromium.sh fi echo 'travis_fold:end:install-chromium' @@ -72,9 +72,8 @@ $(npm bin)/tsd reinstall --overwrite --config modules/angular1_router/tsd.json echo 'travis_fold:end:install.typings' -# TODO: install webdriver stuff # node tools/chromedriverpatch.js -# webdriver-manager update +$(npm bin)/webdriver-manager update # TODO: install bower packages # bower install diff --git a/scripts/ci-lite/test.sh b/scripts/ci-lite/test.sh index 8670368918..739d2eafed 100755 --- a/scripts/ci-lite/test.sh +++ b/scripts/ci-lite/test.sh @@ -11,7 +11,7 @@ cd ../.. ./scripts/ci-lite/lint.sh ./scripts/ci-lite/test_js.sh -./scripts/ci-lite/test_build_only.sh +./scripts/ci-lite/test_e2e.sh ./scripts/ci-lite/test_saucelabs.sh ./scripts/ci-lite/test_browserstack.sh diff --git a/scripts/ci-lite/test_build_only.sh b/scripts/ci-lite/test_build_only.sh deleted file mode 100755 index c663f44c82..0000000000 --- a/scripts/ci-lite/test_build_only.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash - -set -ex -o pipefail - -if [[ ${TRAVIS} && ${CI_MODE} != "build_only" ]]; then - exit 0; -fi - - -echo 'travis_fold:start:test.js' - -# Setup environment -cd `dirname $0` -source ./env.sh -cd ../.. - - -echo 'travis_fold:start:test.buildPackages' - -./build.sh - -echo 'travis_fold:end:test.buildPackages' - - -echo 'travis_fold:end:test.js' diff --git a/scripts/ci-lite/test_e2e.sh b/scripts/ci-lite/test_e2e.sh new file mode 100755 index 0000000000..80fc97a44c --- /dev/null +++ b/scripts/ci-lite/test_e2e.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +set -ex -o pipefail + +if [[ ${TRAVIS} && ${CI_MODE} != "e2e" ]]; then + exit 0; +fi + + +echo 'travis_fold:start:test.js' + +# Setup environment +cd `dirname $0` +source ./env.sh +cd ../.. + + +echo 'travis_fold:start:test.buildPackages' + +./build.sh + +echo 'travis_fold:end:test.buildPackages' + + +echo 'travis_fold:start:test.e2e.localChrome' +cd dist/ +python -m SimpleHTTPServer 7777 & +cd .. +if [[ ${TRAVIS} ]]; then + sh -e /etc/init.d/xvfb start +fi +NODE_PATH=$NODE_PATH:./dist/all $(npm bin)/protractor ./protractor-js-new-world.conf.js +echo 'travis_fold:end:test.e2e.localChrome' + + + +echo 'travis_fold:end:test.js' diff --git a/scripts/ci-lite/test_js.sh b/scripts/ci-lite/test_js.sh index 28db6b4a93..2f57e7c7c7 100755 --- a/scripts/ci-lite/test_js.sh +++ b/scripts/ci-lite/test_js.sh @@ -15,16 +15,16 @@ source ./env.sh cd ../.. -echo 'travis_fold:start:test.node' +echo 'travis_fold:start:test.unit.node' # Run unit tests in node node ./dist/tools/tsc-watch/ node -echo 'travis_fold:end:test.node' +echo 'travis_fold:end:test.unit.node' -echo 'travis_fold:start:test.localChrome' +echo 'travis_fold:start:test.unit.localChrome' # rebuild since codegen has overwritten some files. $(npm bin)/ng2tc -p modules/tsconfig.json @@ -35,8 +35,7 @@ if [[ ${TRAVIS} ]]; then fi $(npm bin)/karma start ./karma-js.conf.js --single-run --browsers=${KARMA_JS_BROWSERS} -echo 'travis_fold:end:test.localChrome' - +echo 'travis_fold:end:test.unit.localChrome' echo 'travis_fold:end:test.js'