diff --git a/modules/angular2/src/test_lib/shims_for_IE.js b/modules/angular2/src/test_lib/shims_for_IE.js index 9bb828bdb1..ad93ee07c1 100644 --- a/modules/angular2/src/test_lib/shims_for_IE.js +++ b/modules/angular2/src/test_lib/shims_for_IE.js @@ -84,4 +84,17 @@ if (!Object.hasOwnProperty('name')) { this.hash = hash; } global.URLPolyfill = URLPolyfill; -})(typeof self != 'undefined' ? self : global); \ No newline at end of file +})(typeof self != 'undefined' ? self : global); + +//classList (IE9) +/*! @license please refer to http://unlicense.org/ */ +/*! @author Eli Grey */ +/*! @source https://github.com/eligrey/classList.js */ +;if("document" in self&&!("classList" in document.createElement("_"))){(function(j){"use strict";if(!("Element" in j)){return}var a="classList",f="prototype",m=j.Element[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p { @@ -512,7 +512,7 @@ function commonTests() { macroTask(() => { _zone.run(() => { completerA.resolve(null); }); }, 20); - macroTask(() => { _zone.run(() => { completerB.resolve(null); }); }, 60); + macroTask(() => { _zone.run(() => { completerB.resolve(null); }); }, 100); macroTask(() => { expect(_log.result()) @@ -524,8 +524,8 @@ function commonTests() { // Third VM turn 'onTurnStart; b then; onTurnDone'); async.done(); - }, 90); - })); + }, 180); + }), 200); it('should call onTurnStart and onTurnDone before and after (respectively) all turns in a chain', inject([AsyncTestCompleter], (async) => { @@ -597,8 +597,8 @@ function commonTests() { expect(_errors.length).toBe(1); expect(_errors[0]).toEqual(exception); async.done(); - }, 80); - })); + }, 150); + }), 200); it('should call onError when onTurnDone throws and the zone is sync', inject([AsyncTestCompleter], (async) => { diff --git a/modules/angular2/test/router/location_spec.ts b/modules/angular2/test/router/location_spec.ts index 83e27466e4..9ed195bb38 100644 --- a/modules/angular2/test/router/location_spec.ts +++ b/modules/angular2/test/router/location_spec.ts @@ -63,7 +63,7 @@ export function main() { expect(ev['url']).toEqual('/user/btford'); async.done(); }) - })); + }), 1000); it('should normalize location path', () => { locationStrategy.internalPath = '/my/app/user/btford'; diff --git a/modules/angular2/test/router/outlet_spec.ts b/modules/angular2/test/router/outlet_spec.ts index 5b9ea281f9..f5cade14ea 100644 --- a/modules/angular2/test/router/outlet_spec.ts +++ b/modules/angular2/test/router/outlet_spec.ts @@ -102,7 +102,7 @@ export function main() { expect(rootTC.nativeElement).toHaveText('hello'); async.done(); }); - })); + }), 1000); it('should navigate between components with different parameters', @@ -120,7 +120,7 @@ export function main() { expect(rootTC.nativeElement).toHaveText('hello igor'); async.done(); }); - })); + }), 1000); it('should work with child routers', inject([AsyncTestCompleter], (async) => { @@ -132,7 +132,7 @@ export function main() { expect(rootTC.nativeElement).toHaveText('outer { inner { hello } }'); async.done(); }); - })); + }), 1000); it('should work with redirects', inject([AsyncTestCompleter, Location], (async, location) => { @@ -148,7 +148,7 @@ export function main() { expect(location.urlChanges).toEqual(['/redirected']); async.done(); }); - })); + }), 1000); function getHref(tc) { return DOM.getAttribute(tc.componentViewChildren[0].nativeElement, 'href'); @@ -165,7 +165,7 @@ export function main() { expect(getHref(rootTC)).toEqual('/my/base/user'); async.done(); }); - })); + }), 1000); it('should generate link hrefs without params', inject([AsyncTestCompleter], (async) => { @@ -177,7 +177,7 @@ export function main() { expect(getHref(rootTC)).toEqual('/user'); async.done(); }); - })); + }), 1000); it('should reuse common parent components', inject([AsyncTestCompleter], (async) => { @@ -196,7 +196,7 @@ export function main() { expect(rootTC.nativeElement).toHaveText('team angular { hello victor }'); async.done(); }); - })); + }), 1000); it('should generate link hrefs with params', inject([AsyncTestCompleter], (async) => { @@ -212,7 +212,7 @@ export function main() { .toEqual('/user/brian'); async.done(); }); - })); + }), 1000); it('should generate link hrefs from a child to its sibling', inject([AsyncTestCompleter], (async) => { @@ -228,7 +228,7 @@ export function main() { .toEqual('/page/2'); async.done(); }); - })); + }), 1000); it('should generate relative links preserving the existing parent route', inject([AsyncTestCompleter], (async) => { @@ -251,7 +251,7 @@ export function main() { .toEqual('/book/1984/page/2'); async.done(); }); - })); + }), 1000); it('should inject RouteData into component', inject([AsyncTestCompleter], (async) => { compile() @@ -264,7 +264,7 @@ export function main() { expect(rootTC.nativeElement).toHaveText(Json.stringify({'isAdmin': true})); async.done(); }); - })); + }), 1000); it('should inject RouteData into component with AsyncRoute', inject([AsyncTestCompleter], (async) => { @@ -279,7 +279,7 @@ export function main() { expect(rootTC.nativeElement).toHaveText(Json.stringify({'isAdmin': true})); async.done(); }); - })); + }), 1000); it('should inject nested RouteData into component', inject([AsyncTestCompleter], (async) => { compile() @@ -297,7 +297,7 @@ export function main() { .toHaveText(Json.stringify({'isAdmin': true, 'test': {'moreData': 'testing'}})); async.done(); }); - })); + }), 1000); it('should inject null if the route has no data property', inject([AsyncTestCompleter], (async) => { @@ -310,7 +310,7 @@ export function main() { expect(rootTC.nativeElement).toHaveText('null'); async.done(); }); - })); + }), 1000); it('should allow an array as the route data', inject([AsyncTestCompleter], (async) => { compile() @@ -323,7 +323,7 @@ export function main() { expect(rootTC.nativeElement).toHaveText(Json.stringify([1, 2, 3])); async.done(); }); - })); + }), 1000); it('should allow a string as the route data', inject([AsyncTestCompleter], (async) => { compile() @@ -337,7 +337,7 @@ export function main() { expect(rootTC.nativeElement).toHaveText(Json.stringify('hello world')); async.done(); }); - })); + }), 1000); describe('lifecycle hooks', () => { it('should call the onActivate hook', inject([AsyncTestCompleter], (async) => { @@ -350,7 +350,7 @@ export function main() { expect(log).toEqual(['activate: null -> /on-activate']); async.done(); }); - })); + }), 1000); it('should wait for a parent component\'s onActivate hook to resolve before calling its child\'s', inject([AsyncTestCompleter], (async) => { @@ -373,7 +373,7 @@ export function main() { async.done(); }); }); - })); + }), 1000); it('should call the onDeactivate hook', inject([AsyncTestCompleter], (async) => { compile() @@ -386,7 +386,7 @@ export function main() { expect(log).toEqual(['deactivate: /on-deactivate -> /a']); async.done(); }); - })); + }), 1000); it('should wait for a child component\'s onDeactivate hook to resolve before calling its parent\'s', inject([AsyncTestCompleter], (async) => { @@ -411,7 +411,7 @@ export function main() { async.done(); }); }); - })); + }), 1000); it('should reuse a component when the canReuse hook returns true', inject([AsyncTestCompleter], (async) => { @@ -432,7 +432,7 @@ export function main() { expect(cmpInstanceCount).toBe(1); async.done(); }); - })); + }), 1000); it('should not reuse a component when the canReuse hook returns false', @@ -454,7 +454,7 @@ export function main() { expect(cmpInstanceCount).toBe(2); async.done(); }); - })); + }), 1000); it('should navigate when canActivate returns true', inject([AsyncTestCompleter], (async) => { @@ -474,7 +474,7 @@ export function main() { async.done(); }); }); - })); + }), 1000); it('should not navigate when canActivate returns false', inject([AsyncTestCompleter], (async) => { @@ -494,7 +494,7 @@ export function main() { async.done(); }); }); - })); + }), 1000); it('should navigate away when canDeactivate returns true', inject([AsyncTestCompleter], (async) => { @@ -519,7 +519,7 @@ export function main() { async.done(); }); }); - })); + }), 1000); it('should not navigate away when canDeactivate returns false', inject([AsyncTestCompleter], (async) => { @@ -544,7 +544,7 @@ export function main() { async.done(); }); }); - })); + }), 1000); it('should run activation and deactivation hooks in the correct order', @@ -572,7 +572,7 @@ export function main() { ]); async.done(); }); - })); + }), 1000); it('should only run reuse hooks when reusing', inject([AsyncTestCompleter], (async) => { compile() @@ -599,7 +599,7 @@ export function main() { ]); async.done(); }); - })); + }), 1000); it('should not run reuse hooks when not reusing', inject([AsyncTestCompleter], (async) => { compile() @@ -628,7 +628,7 @@ export function main() { ]); async.done(); }); - })); + }), 1000); }); diff --git a/modules/angular2/test/router/route_config_spec.ts b/modules/angular2/test/router/route_config_spec.ts index 07aa58c5a2..f6a0594a79 100644 --- a/modules/angular2/test/router/route_config_spec.ts +++ b/modules/angular2/test/router/route_config_spec.ts @@ -65,7 +65,7 @@ export function main() { }); router.navigate('/parent/child'); }); - })); + }), 1000); it('should work in an app with redirects', inject([AsyncTestCompleter], (async) => { @@ -79,7 +79,7 @@ export function main() { }); router.navigate('/before'); }); - })); + }), 1000); it('should work in an app with async components', inject([AsyncTestCompleter], (async) => { @@ -93,7 +93,7 @@ export function main() { }); router.navigate('/hello'); }); - })); + }), 1000); it('should work in an app with a constructor component', @@ -108,7 +108,7 @@ export function main() { }); router.navigate('/hello'); }); - })); + }), 1000); it('should throw if a config is missing a target', inject( diff --git a/sauce.conf.js b/sauce.conf.js index 84a9e088e1..83b97f7707 100644 --- a/sauce.conf.js +++ b/sauce.conf.js @@ -125,7 +125,7 @@ var aliases = { 'SAFARI': ['SL_SAFARI7', 'SL_SAFARI8'], 'BETA': ['SL_CHROMEBETA', 'SL_FIREFOXBETA'], 'DEV': ['SL_CHROMEDEV', 'SL_FIREFOXDEV'], - 'CI': ['SL_CHROME', 'SL_ANDROID5.1', 'SL_SAFARI8', 'SL_IOS8', 'SL_FIREFOX', 'SL_IE11', 'SL_IE10'] + 'CI': ['SL_CHROME', 'SL_ANDROID5.1', 'SL_SAFARI8', 'SL_IOS8', 'SL_FIREFOX', 'SL_IE11', 'SL_IE10', 'SL_IE9'] }; module.exports = {