From 56aec97fd3671318736f930c913300da2243efef Mon Sep 17 00:00:00 2001 From: "JiaLi.Passion" Date: Thu, 14 Sep 2017 08:58:09 +0900 Subject: [PATCH] disable SL_IOS9 --- karma-dist-sauce-jasmine.conf.js | 2 +- sauce.conf.js | 15 +++++++++++++-- test/rxjs/rxjs.Observable.combine.spec.ts | 20 +++++++------------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/karma-dist-sauce-jasmine.conf.js b/karma-dist-sauce-jasmine.conf.js index 401ac3b71..44f6be74a 100644 --- a/karma-dist-sauce-jasmine.conf.js +++ b/karma-dist-sauce-jasmine.conf.js @@ -8,5 +8,5 @@ module.exports = function (config) { require('./karma-dist-jasmine.conf.js')(config); - require('./sauce.conf')(config); + require('./sauce.conf')(config, ['SL_IOS9']); }; diff --git a/sauce.conf.js b/sauce.conf.js index d1c0393b0..a6026ad50 100644 --- a/sauce.conf.js +++ b/sauce.conf.js @@ -1,10 +1,10 @@ // Sauce configuration -module.exports = function (config) { +module.exports = function (config, ignoredLaunchers) { // The WS server is not available with Sauce config.files.unshift('test/saucelabs.js'); - var customLaunchers = { + var basicLaunchers = { 'SL_CHROME': { base: 'SauceLabs', browserName: 'chrome', @@ -153,6 +153,17 @@ module.exports = function (config) { } }; + var customLaunchers = {}; + if (!ignoredLaunchers) { + customLaunchers = basicLaunchers; + } else { + Object.keys(basicLaunchers).forEach(function(key) { + if (ignoredLaunchers.filter(function(ignore) {return ignore === key;}).length === 0) { + customLaunchers[key] = basicLaunchers[key]; + } + }); + } + config.set({ captureTimeout: 120000, browserNoActivityTimeout: 240000, diff --git a/test/rxjs/rxjs.Observable.combine.spec.ts b/test/rxjs/rxjs.Observable.combine.spec.ts index 2196369e1..c77f0596e 100644 --- a/test/rxjs/rxjs.Observable.combine.spec.ts +++ b/test/rxjs/rxjs.Observable.combine.spec.ts @@ -51,13 +51,11 @@ describe('Observable.combine', () => { const constructorZone1: Zone = Zone.current.fork({name: 'Constructor Zone1'}); const subscriptionZone: Zone = Zone.current.fork({name: 'Subscription Zone'}); observable1 = constructorZone1.run(() => { - const source = Rx.Observable.interval(10); - const highOrder = source - .map((src: any) => { - expect(Zone.current.name).toEqual(constructorZone1.name); - return Rx.Observable.interval(50).take(3); - }) - .take(2); + const source = Rx.Observable.of(1, 2, 3); + const highOrder = source.map((src: any) => { + expect(Zone.current.name).toEqual(constructorZone1.name); + return Rx.Observable.of(src); + }); return highOrder.combineAll((x: any, y: any) => { expect(Zone.current.name).toEqual(constructorZone1.name); return {x: x, y: y}; @@ -76,14 +74,10 @@ describe('Observable.combine', () => { () => { log.push('completed'); expect(Zone.current.name).toEqual(subscriptionZone.name); - expect(log).toEqual([ - {x: 0, y: 0}, {x: 1, y: 0}, {x: 1, y: 1}, {x: 2, y: 1}, {x: 2, y: 2}, 'completed' - ]); + expect(log).toEqual([{x: 1, y: 2}, 'completed']); done(); }); }); - - expect(log).toEqual([]); }, Zone.root)); it('combineLatest func callback should run in the correct zone', () => { @@ -141,4 +135,4 @@ describe('Observable.combine', () => { expect(log).toEqual([7, 8, 9, 'completed']); }); -}); \ No newline at end of file +});