From 0ea937b1bbc9d1b297a36ed09af2a20ae06af83f Mon Sep 17 00:00:00 2001 From: Jay Date: Tue, 30 Mar 2021 08:15:44 +0200 Subject: [PATCH 1/4] [Updated] karma sauce launcher which should fix suace tests that are no longer showing as passed and rather completed --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 37cad041f6..9b4e02fa84 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "karma-jasmine": "^1.1.1", "karma-jasmine-ajax": "^0.1.13", "karma-safari-launcher": "^1.0.0", - "karma-sauce-launcher": "^1.2.0", + "karma-sauce-launcher": "^4.3.5", "karma-sinon": "^1.0.5", "karma-sourcemap-loader": "^0.3.8", "karma-webpack": "^4.0.2", From 7dd3d3e22093a6ab42999fecfc26549de86ce98e Mon Sep 17 00:00:00 2001 From: Jay Date: Wed, 31 Mar 2021 07:58:59 +0200 Subject: [PATCH 2/4] [Updated] karma config to follow es-lint rules of axios --- karma.conf.js | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 5bd7760af5..d7bd50d54a 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,6 +1,11 @@ +/* eslint-disable no-console */ +/* eslint-disable no-unused-vars */ +/* eslint-disable func-names */ // Karma configuration // Generated on Fri Aug 15 2014 23:11:13 GMT-0500 (CDT) +'use strict'; + var webpack = require('webpack'); function createCustomLauncher(browser, version, platform) { @@ -19,7 +24,7 @@ module.exports = function(config) { if (process.env.SAUCE_USERNAME || process.env.SAUCE_ACCESS_KEY) { customLaunchers = {}; - + var runAll = true; var options = [ 'SAUCE_CHROME', @@ -32,7 +37,7 @@ module.exports = function(config) { 'SAUCE_ANDROID' ]; - options.forEach(function (opt) { + options.forEach(function(opt) { if (process.env[opt]) { runAll = false; } @@ -56,21 +61,20 @@ module.exports = function(config) { if (runAll || process.env.SAUCE_SAFARI) { // customLaunchers.SL_Safari7 = createCustomLauncher('safari', 7); // customLaunchers.SL_Safari8 = createCustomLauncher('safari', 8); - customLaunchers.SL_Safari9 = createCustomLauncher( - "safari", + 'safari', 9.0, - "OS X 10.11" + 'OS X 10.11' ); customLaunchers.SL_Safari10 = createCustomLauncher( - "safari", - "10.1", - "macOS 10.12" + 'safari', + '10.1', + 'macOS 10.12' ); customLaunchers.SL_Safari11 = createCustomLauncher( - "safari", - "11.1", - "macOS 10.13" + 'safari', + '11.1', + 'macOS 10.13' ); } @@ -125,9 +129,9 @@ module.exports = function(config) { browsers = ['Firefox']; } else { console.log('Running locally since SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are not set.'); - browsers = ['Firefox', 'Chrome']; + browsers = ['Chrome']; } - + config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) basePath: '', @@ -141,14 +145,12 @@ module.exports = function(config) { // list of files / patterns to load in the browser files: [ 'test/specs/__helpers.js', - 'test/specs/**/*.spec.js', + 'test/specs/**/*.spec.js' ], // list of files to exclude - exclude: [ - - ], + exclude: [], // preprocess matching files before serving them to the browser @@ -209,7 +211,7 @@ module.exports = function(config) { { './adapters/http': 'var undefined' } - ], + ] }, webpackServer: { From fc57486a1d5e50c6fff231b31350f041bb1da3ff Mon Sep 17 00:00:00 2001 From: Jay Date: Wed, 31 Mar 2021 08:01:43 +0200 Subject: [PATCH 3/4] [Updated] karma version to latest --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9b4e02fa84..19dd0ef3bb 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "grunt-webpack": "^4.0.2", "istanbul-instrumenter-loader": "^1.0.0", "jasmine-core": "^2.4.1", - "karma": "^5.2.3", + "karma": "^6.3.2", "karma-chrome-launcher": "^3.1.0", "karma-firefox-launcher": "^2.1.0", "karma-jasmine": "^1.1.1", From cec71aba55af40fdedf1edb8e08d3797d8d4aa63 Mon Sep 17 00:00:00 2001 From: Jay Date: Wed, 31 Mar 2021 09:36:17 +0200 Subject: [PATCH 4/4] [Added] propper browsers when testing local --- karma.conf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/karma.conf.js b/karma.conf.js index d7bd50d54a..26660b1434 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -129,7 +129,7 @@ module.exports = function(config) { browsers = ['Firefox']; } else { console.log('Running locally since SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are not set.'); - browsers = ['Chrome']; + browsers = ['Firefox', 'Chrome']; } config.set({