From f2e7e5dc31083499dda3cba8555553349c6a5233 Mon Sep 17 00:00:00 2001 From: Matteo Perelli Date: Thu, 22 Dec 2016 10:00:37 +0100 Subject: [PATCH 1/2] Config file fix --- karma.conf.js | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 03727fa355..2b3b24a057 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -3,13 +3,15 @@ */ module.exports = function(config) { - var webdriverConfig = { - hostname: '4science-devel1', - port: 4202 - } - + var testWebpackConfig = require('./webpack.test.config.js')({env: 'test'}); + // Uncomment and change to run tests on a remote Selenium server + var webdriverConfig = { + hostname: 'localhost', + port: 4444 + } + var configuration = { // base path that will be used to resolve all patterns (e.g. files, exclude) @@ -83,8 +85,8 @@ module.exports = function(config) { */ reporters: [ 'coverage', 'karma-remap-istanbul' ], - // web server port - port: 4212, + // Karma web server port + port: 9876, // enable / disable colors in the output (reporters and logs) colors: true, @@ -104,19 +106,25 @@ module.exports = function(config) { */ browsers: [ 'Chrome' + //'ChromeTravisCi', + //'SeleniumChrome', + //'SeleniumFirefox' ], customLaunchers: { - ChromeTravisCi: { + // Continuous integraation with Chrome - launcher + 'ChromeTravisCi': { base: 'Chrome', flags: ['--no-sandbox'] }, - 'chrome': { + // Remote Selenium Server with Chrome - launcher + 'SeleniumChrome': { base: 'WebDriver', config: webdriverConfig, browserName: 'chrome', }, - 'firefox': { + // Remote Selenium Server with Firefox - launcher + 'SeleniumFirefox': { base: 'WebDriver', config: webdriverConfig, browserName: 'firefox', From 95a39ef88ce34996ab87fdcf1c52aa2eb6095b4f Mon Sep 17 00:00:00 2001 From: Matteo Perelli Date: Thu, 22 Dec 2016 12:05:58 +0100 Subject: [PATCH 2/2] Config file fix --- karma.conf.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 2b3b24a057..9061846541 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -58,7 +58,7 @@ module.exports = function(config) { reporters:[ {type: 'in-memory'}, {type: 'json', subdir: '.', file: 'coverage-final.json'}, - {type : 'html', dir : 'coverage/'} + {type: 'html', dir : 'coverage/'} ] }, @@ -98,7 +98,7 @@ module.exports = function(config) { logLevel: config.LOG_INFO, // enable / disable watching file and executing tests whenever any file changes - autoWatch: true, + autoWatch: false, /* * start these browsers