From ba3fb0c5fa1bce2432808f1af1a9a9b8919a36ae Mon Sep 17 00:00:00 2001 From: manchandavishal Date: Mon, 14 Dec 2020 16:43:16 +0000 Subject: [PATCH] Run npm nodejs job with Phantomjs browser This patch update browser from Chrome to Phantomjs in karma.conf.js because nodejs job fails with Chrome browser as not able to access some URL. So let's switch to Phantomjs browser now then we can use Chrome browser in future once this issue is resolved. It also adds libfontconfig1 in bindep.txt as phantomjs requires libfontconfg[1]. [1] https://www.npmjs.com/package/phantomjs-prebuilt#linux-note Change-Id: Id66915db78d788d98645d536fb112dadf9a89aed --- bindep.txt | 1 + karma.conf.js | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bindep.txt b/bindep.txt index 144e285..4475445 100644 --- a/bindep.txt +++ b/bindep.txt @@ -1,5 +1,6 @@ # selenium tests firefox [selenium] +libfontconfig1 [nodejs platform:dpkg] xvfb [selenium platform:dpkg] # already part of xorg-x11-server on openSUSE xorg-x11-server-Xvfb [selenium platform:redhat] diff --git a/karma.conf.js b/karma.conf.js index 8a6ee2e..b8e837d 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -140,7 +140,7 @@ module.exports = function (config) { frameworks: ['jasmine'], - browsers: ['Chrome'], + browsers: ['PhantomJS'], phantomjsLauncher: { // Have phantomjs exit if a ResourceError is encountered @@ -152,7 +152,7 @@ module.exports = function (config) { //reporters: ['spec'], plugins: [ - 'karma-chrome-launcher', + 'karma-phantomjs-launcher', 'karma-jasmine', 'karma-ng-html2js-preprocessor', 'karma-spec-reporter', diff --git a/package.json b/package.json index db670c4..5939b2b 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "eslint-config-openstack": "1.2.4", "jasmine-core": "2.4.1", "karma": "1.1.2", - "karma-chrome-launcher": "1.0.1", + "karma-phantomjs-launcher": "1.0.1", "karma-cli": "^1.0.1", "karma-jasmine": "1.0.2", "karma-ng-html2js-preprocessor": "1.0.0",