mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 03:01:06 -03:30
replace phantomjs with headless chrome
This commit is contained in:
committed by
Matthew Jones
parent
3a8bacb8ef
commit
89e41f7524
5450
awx/ui/package-lock.json
generated
5450
awx/ui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@
|
|||||||
"pretest": "",
|
"pretest": "",
|
||||||
"test": "karma start test/spec/karma.spec.js",
|
"test": "karma start test/spec/karma.spec.js",
|
||||||
"jshint": "grunt jshint:source --no-color",
|
"jshint": "grunt jshint:source --no-color",
|
||||||
"test:ci": "npm run test -- --single-run --reporter junit,dots --browsers=PhantomJS",
|
"test:ci": "npm run test -- --single-run --reporter junit,dots --browsers=chromeHeadless",
|
||||||
"e2e": "./test/e2e/runner.js --config ./test/e2e/nightwatch.conf.js --suiteRetries=2",
|
"e2e": "./test/e2e/runner.js --config ./test/e2e/nightwatch.conf.js --suiteRetries=2",
|
||||||
"unit": "karma start test/unit/karma.unit.js",
|
"unit": "karma start test/unit/karma.unit.js",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
@@ -74,7 +74,6 @@
|
|||||||
"karma-html2js-preprocessor": "^1.0.0",
|
"karma-html2js-preprocessor": "^1.0.0",
|
||||||
"karma-jasmine": "^1.1.0",
|
"karma-jasmine": "^1.1.0",
|
||||||
"karma-junit-reporter": "^1.2.0",
|
"karma-junit-reporter": "^1.2.0",
|
||||||
"karma-phantomjs-launcher": "^1.0.2",
|
|
||||||
"karma-sourcemap-loader": "^0.3.7",
|
"karma-sourcemap-loader": "^0.3.7",
|
||||||
"karma-webpack": "^2.0.4",
|
"karma-webpack": "^2.0.4",
|
||||||
"less": "^2.7.2",
|
"less": "^2.7.2",
|
||||||
@@ -86,7 +85,7 @@
|
|||||||
"nightwatch": "^0.9.19",
|
"nightwatch": "^0.9.19",
|
||||||
"node-object-hash": "^1.3.0",
|
"node-object-hash": "^1.3.0",
|
||||||
"nunjucks": "^3.1.2",
|
"nunjucks": "^3.1.2",
|
||||||
"phantomjs-prebuilt": "^2.1.12",
|
"puppeteer": "^1.8.0",
|
||||||
"time-grunt": "^1.4.0",
|
"time-grunt": "^1.4.0",
|
||||||
"uglifyjs-webpack-plugin": "^0.4.6",
|
"uglifyjs-webpack-plugin": "^0.4.6",
|
||||||
"uuid": "^3.1.0",
|
"uuid": "^3.1.0",
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const webpackConfig = require('./webpack.spec');
|
||||||
|
|
||||||
|
process.env.CHROME_BIN = require('puppeteer').executablePath();
|
||||||
|
|
||||||
const SRC_PATH = path.resolve(__dirname, '../../client/src');
|
const SRC_PATH = path.resolve(__dirname, '../../client/src');
|
||||||
const NODE_MODULES = path.resolve(__dirname, '../../node_modules');
|
const NODE_MODULES = path.resolve(__dirname, '../../node_modules');
|
||||||
|
|
||||||
const webpackConfig = require('./webpack.spec');
|
|
||||||
|
|
||||||
module.exports = config => {
|
module.exports = config => {
|
||||||
config.set({
|
config.set({
|
||||||
basePath: '../..',
|
basePath: '../..',
|
||||||
@@ -14,7 +15,6 @@ module.exports = config => {
|
|||||||
frameworks: ['jasmine'],
|
frameworks: ['jasmine'],
|
||||||
reporters: ['progress', 'junit'],
|
reporters: ['progress', 'junit'],
|
||||||
files:[
|
files:[
|
||||||
'test/spec/polyfills.js',
|
|
||||||
'client/src/vendor.js',
|
'client/src/vendor.js',
|
||||||
path.join(NODE_MODULES, 'angular-mocks/angular-mocks.js'),
|
path.join(NODE_MODULES, 'angular-mocks/angular-mocks.js'),
|
||||||
path.join(SRC_PATH, 'app.js'),
|
path.join(SRC_PATH, 'app.js'),
|
||||||
@@ -35,6 +35,18 @@ module.exports = config => {
|
|||||||
outputDir: 'reports',
|
outputDir: 'reports',
|
||||||
outputFile: 'results.spec.xml',
|
outputFile: 'results.spec.xml',
|
||||||
useBrowserName: false
|
useBrowserName: false
|
||||||
}
|
},
|
||||||
|
customLaunchers: {
|
||||||
|
chromeHeadless: {
|
||||||
|
base: 'Chrome',
|
||||||
|
flags: [
|
||||||
|
'--no-sandbox',
|
||||||
|
'--disable-setuid-sandbox',
|
||||||
|
'--headless',
|
||||||
|
'--disable-gpu',
|
||||||
|
'--remote-debugging-port=9222',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill
|
|
||||||
|
|
||||||
if (typeof Object.assign != 'function') {
|
|
||||||
// Must be writable: true, enumerable: false, configurable: true
|
|
||||||
Object.defineProperty(Object, "assign", {
|
|
||||||
value: function assign(target, varArgs) { // .length of function is 2
|
|
||||||
'use strict';
|
|
||||||
if (target == null) { // TypeError if undefined or null
|
|
||||||
throw new TypeError('Cannot convert undefined or null to object');
|
|
||||||
}
|
|
||||||
|
|
||||||
var to = Object(target);
|
|
||||||
|
|
||||||
for (var index = 1; index < arguments.length; index++) {
|
|
||||||
var nextSource = arguments[index];
|
|
||||||
|
|
||||||
if (nextSource != null) { // Skip over if undefined or null
|
|
||||||
for (var nextKey in nextSource) {
|
|
||||||
// Avoid bugs when hasOwnProperty is shadowed
|
|
||||||
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
|
|
||||||
to[nextKey] = nextSource[nextKey];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return to;
|
|
||||||
},
|
|
||||||
writable: true,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const webpackConfig = require('../../build/webpack.test.js');
|
||||||
|
|
||||||
|
process.env.CHROME_BIN = require('puppeteer').executablePath();
|
||||||
|
|
||||||
const SRC_PATH = path.resolve(__dirname, '../../client/src');
|
const SRC_PATH = path.resolve(__dirname, '../../client/src');
|
||||||
|
|
||||||
const webpackConfig = require('./webpack.unit');
|
|
||||||
|
|
||||||
module.exports = config => {
|
module.exports = config => {
|
||||||
config.set({
|
config.set({
|
||||||
basePath: '',
|
basePath: '',
|
||||||
@@ -11,10 +12,9 @@ module.exports = config => {
|
|||||||
autoWatch: false,
|
autoWatch: false,
|
||||||
colors: true,
|
colors: true,
|
||||||
frameworks: ['jasmine'],
|
frameworks: ['jasmine'],
|
||||||
browsers: ['PhantomJS'],
|
browsers: ['chromeHeadless'],
|
||||||
reporters: ['progress', 'junit'],
|
reporters: ['progress', 'junit'],
|
||||||
files: [
|
files: [
|
||||||
'./polyfills.js',
|
|
||||||
path.join(SRC_PATH, 'vendor.js'),
|
path.join(SRC_PATH, 'vendor.js'),
|
||||||
path.join(SRC_PATH, 'app.js'),
|
path.join(SRC_PATH, 'app.js'),
|
||||||
path.join(SRC_PATH, '**/*.html'),
|
path.join(SRC_PATH, '**/*.html'),
|
||||||
@@ -24,7 +24,7 @@ module.exports = config => {
|
|||||||
'karma-webpack',
|
'karma-webpack',
|
||||||
'karma-jasmine',
|
'karma-jasmine',
|
||||||
'karma-junit-reporter',
|
'karma-junit-reporter',
|
||||||
'karma-phantomjs-launcher',
|
'karma-chrome-launcher',
|
||||||
'karma-html2js-preprocessor'
|
'karma-html2js-preprocessor'
|
||||||
],
|
],
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
@@ -41,6 +41,18 @@ module.exports = config => {
|
|||||||
outputDir: 'reports',
|
outputDir: 'reports',
|
||||||
outputFile: 'results.unit.xml',
|
outputFile: 'results.unit.xml',
|
||||||
useBrowserName: false
|
useBrowserName: false
|
||||||
}
|
},
|
||||||
|
customLaunchers: {
|
||||||
|
chromeHeadless: {
|
||||||
|
base: 'Chrome',
|
||||||
|
flags: [
|
||||||
|
'--no-sandbox',
|
||||||
|
'--disable-setuid-sandbox',
|
||||||
|
'--headless',
|
||||||
|
'--disable-gpu',
|
||||||
|
'--remote-debugging-port=9222',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
|
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill
|
|
||||||
|
|
||||||
if (typeof Object.assign != 'function') {
|
|
||||||
// Must be writable: true, enumerable: false, configurable: true
|
|
||||||
Object.defineProperty(Object, "assign", {
|
|
||||||
value: function assign(target, varArgs) { // .length of function is 2
|
|
||||||
'use strict';
|
|
||||||
if (target == null) { // TypeError if undefined or null
|
|
||||||
throw new TypeError('Cannot convert undefined or null to object');
|
|
||||||
}
|
|
||||||
|
|
||||||
var to = Object(target);
|
|
||||||
|
|
||||||
for (var index = 1; index < arguments.length; index++) {
|
|
||||||
var nextSource = arguments[index];
|
|
||||||
|
|
||||||
if (nextSource != null) { // Skip over if undefined or null
|
|
||||||
for (var nextKey in nextSource) {
|
|
||||||
// Avoid bugs when hasOwnProperty is shadowed
|
|
||||||
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
|
|
||||||
to[nextKey] = nextSource[nextKey];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return to;
|
|
||||||
},
|
|
||||||
writable: true,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user