From cf85e19ff94f88facacd7c77e0a211ca8f6ae24e Mon Sep 17 00:00:00 2001 From: Marc Laval Date: Tue, 4 Apr 2017 12:26:51 +0200 Subject: [PATCH 1/4] ci(SauceLabs): refresh browsers list --- sauce.conf.js | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/sauce.conf.js b/sauce.conf.js index 7915c47fc..0fa7d687f 100644 --- a/sauce.conf.js +++ b/sauce.conf.js @@ -13,27 +13,29 @@ module.exports = function (config) { 'SL_FIREFOX': { base: 'SauceLabs', browserName: 'firefox', - version: '44' + version: '52' }, /*'SL_SAFARI7': { base: 'SauceLabs', browserName: 'safari', platform: 'OS X 10.9', - version: '7' + version: '7.0' },*/ 'SL_SAFARI8': { base: 'SauceLabs', - browserName: 'safari', - platform: 'OS X 10.10', - version: '8' + browserName: 'safari', + platform: 'OS X 10.10', + version: '8.0' }, 'SL_SAFARI9': { base: 'SauceLabs', - browserName: 'safari', - platform: 'OS X 10.11', - version: '9.0' + browserName: 'safari', + platform: 'OS X 10.11', + version: '9.0' }, - /*'SL_IOS7': { + /* + no longer supported in SauceLabs + 'SL_IOS7': { base: 'SauceLabs', browserName: 'iphone', platform: 'OS X 10.10', @@ -45,19 +47,24 @@ module.exports = function (config) { platform: 'OS X 10.10', version: '8.4' }, - /*'SL_IOS9': { + 'SL_IOS9': { base: 'SauceLabs', browserName: 'iphone', platform: 'OS X 10.10', - version: '9.2' - },*/ - /* Dissabled do to: https://travis-ci.org/angular/zone.js/builds/141228742#L744 - 'SL_IE9': { + version: '9.3' + }, + 'SL_IOS10': { + base: 'SauceLabs', + browserName: 'iphone', + platform: 'OS X 10.10', + version: '10.2' + }, + 'SL_IE9': { base: 'SauceLabs', browserName: 'internet explorer', platform: 'Windows 2008', version: '9' - },*/ + }, 'SL_IE10': { base: 'SauceLabs', browserName: 'internet explorer', @@ -70,11 +77,11 @@ module.exports = function (config) { platform: 'Windows 10', version: '11' }, - 'SL_MSEDGE13': { + 'SL_MSEDGE': { base: 'SauceLabs', browserName: 'MicrosoftEdge', platform: 'Windows 10', - version: '13.10586' + version: '14.14393' }, /* fix issue #584, Android 4.1~4.3 are not supported From 081b672507179a2d9a269d3a0edea2c65dd8b44d Mon Sep 17 00:00:00 2001 From: Marc Laval Date: Tue, 4 Apr 2017 12:27:45 +0200 Subject: [PATCH 2/4] ci(SauceLabs): add Safari 10 --- .travis.yml | 2 + karma-build-sauce-selenium3-mocha.conf.js | 12 +++++ karma-dist-sauce-selenium3-jasmine.conf.js | 12 +++++ sauce-selenium3.conf.js | 52 ++++++++++++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 karma-build-sauce-selenium3-mocha.conf.js create mode 100644 karma-dist-sauce-selenium3-jasmine.conf.js create mode 100644 sauce-selenium3.conf.js diff --git a/.travis.yml b/.travis.yml index b25fe91ae..ec8f27a6f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,4 +28,6 @@ script: - node_modules/.bin/gulp promisetest - node_modules/.bin/karma start karma-dist-sauce-jasmine.conf.js --single-run - node_modules/.bin/karma start karma-build-sauce-mocha.conf.js --single-run + - node_modules/.bin/karma start karma-dist-sauce-selenium3-jasmine.conf.js --single-run + - node_modules/.bin/karma start karma-build-sauce-selenium3-mocha.conf.js --single-run - node_modules/.bin/gulp test/node diff --git a/karma-build-sauce-selenium3-mocha.conf.js b/karma-build-sauce-selenium3-mocha.conf.js new file mode 100644 index 000000000..6eb77e97a --- /dev/null +++ b/karma-build-sauce-selenium3-mocha.conf.js @@ -0,0 +1,12 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +module.exports = function (config) { + require('./karma-dist-mocha.conf.js')(config); + require('./sauce-selenium3.conf')(config); +}; diff --git a/karma-dist-sauce-selenium3-jasmine.conf.js b/karma-dist-sauce-selenium3-jasmine.conf.js new file mode 100644 index 000000000..d5c65da90 --- /dev/null +++ b/karma-dist-sauce-selenium3-jasmine.conf.js @@ -0,0 +1,12 @@ +/** + * @license + * Copyright Google Inc. All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + +module.exports = function (config) { + require('./karma-dist-jasmine.conf.js')(config); + require('./sauce-selenium3.conf')(config); +}; diff --git a/sauce-selenium3.conf.js b/sauce-selenium3.conf.js new file mode 100644 index 000000000..34792e1a0 --- /dev/null +++ b/sauce-selenium3.conf.js @@ -0,0 +1,52 @@ +// Sauce configuration with Welenium drivers 3+ + +module.exports = function (config) { + // The WS server is not available with Sauce + config.files.unshift('test/saucelabs.js'); + + var customLaunchers = { + 'SL_SAFARI10': { + base: 'SauceLabs', + browserName: 'Safari', + platform: 'macOS 10.12', + version: '10.0' + } + }; + + config.set({ + captureTimeout: 120000, + browserNoActivityTimeout: 240000, + + sauceLabs: { + testName: 'Zone.js', + startConnect: false, + recordVideo: false, + recordScreenshots: false, + options: { + 'selenium-version': '3.3.0', + 'command-timeout': 600, + 'idle-timeout': 600, + 'max-duration': 5400 + } + }, + + customLaunchers: customLaunchers, + + browsers: Object.keys(customLaunchers), + + reporters: ['dots', 'saucelabs'], + + singleRun: true, + + plugins: [ + 'karma-*' + ] + }); + + if (process.env.TRAVIS) { + config.sauceLabs.build = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')'; + config.sauceLabs.tunnelIdentifier = process.env.TRAVIS_JOB_NUMBER; + + process.env.SAUCE_ACCESS_KEY = process.env.SAUCE_ACCESS_KEY.split('').reverse().join(''); + } +}; From d7aaecac544971628a75d77b4e897b365823e732 Mon Sep 17 00:00:00 2001 From: Marc Laval Date: Tue, 4 Apr 2017 12:29:22 +0200 Subject: [PATCH 3/4] fix(long-stack-trace): avoid error.stack crash in IE9 --- lib/zone-spec/long-stack-trace.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/zone-spec/long-stack-trace.ts b/lib/zone-spec/long-stack-trace.ts index 5c12460ea..875add8fd 100644 --- a/lib/zone-spec/long-stack-trace.ts +++ b/lib/zone-spec/long-stack-trace.ts @@ -58,7 +58,7 @@ function addErrorStack(lines: string[], error: Error): void { } function renderLongStackTrace(frames: LongStackTrace[], stack: string): string { - const longTrace: string[] = [stack.trim()]; + const longTrace: string[] = stack ? [stack.trim()] : ['']; if (frames) { let timestamp = new Date().getTime(); From 72557de3e507a73bfa16ed77ed74917ac97489b7 Mon Sep 17 00:00:00 2001 From: Marc Laval Date: Tue, 4 Apr 2017 12:31:27 +0200 Subject: [PATCH 4/4] test(XHR): use onload instead of onloadend for IE9 --- test/browser/XMLHttpRequest.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/browser/XMLHttpRequest.spec.ts b/test/browser/XMLHttpRequest.spec.ts index 541508afd..1f92489a8 100644 --- a/test/browser/XMLHttpRequest.spec.ts +++ b/test/browser/XMLHttpRequest.spec.ts @@ -189,10 +189,10 @@ describe('XMLHttpRequest', function() { const req = new XMLHttpRequest(); req.open('get', '/', true); req.send(); - req.onloadend = function() { - req.onloadend = null; + req.onload = function() { + req.onload = null; req.open('get', '/', true); - req.onloadend = function() { + req.onload = function() { done(); }; expect(() => {