mirror of
https://github.com/ansible/awx.git
synced 2024-10-27 09:25:10 +03:00
replace phantomjs with headless chrome
This commit is contained in:
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": "",
|
||||
"test": "karma start test/spec/karma.spec.js",
|
||||
"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",
|
||||
"unit": "karma start test/unit/karma.unit.js",
|
||||
"lint": "eslint .",
|
||||
@ -74,7 +74,6 @@
|
||||
"karma-html2js-preprocessor": "^1.0.0",
|
||||
"karma-jasmine": "^1.1.0",
|
||||
"karma-junit-reporter": "^1.2.0",
|
||||
"karma-phantomjs-launcher": "^1.0.2",
|
||||
"karma-sourcemap-loader": "^0.3.7",
|
||||
"karma-webpack": "^2.0.4",
|
||||
"less": "^2.7.2",
|
||||
@ -86,7 +85,7 @@
|
||||
"nightwatch": "^0.9.19",
|
||||
"node-object-hash": "^1.3.0",
|
||||
"nunjucks": "^3.1.2",
|
||||
"phantomjs-prebuilt": "^2.1.12",
|
||||
"puppeteer": "^1.8.0",
|
||||
"time-grunt": "^1.4.0",
|
||||
"uglifyjs-webpack-plugin": "^0.4.6",
|
||||
"uuid": "^3.1.0",
|
||||
|
@ -1,10 +1,11 @@
|
||||
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 NODE_MODULES = path.resolve(__dirname, '../../node_modules');
|
||||
|
||||
const webpackConfig = require('./webpack.spec');
|
||||
|
||||
module.exports = config => {
|
||||
config.set({
|
||||
basePath: '../..',
|
||||
@ -14,7 +15,6 @@ module.exports = config => {
|
||||
frameworks: ['jasmine'],
|
||||
reporters: ['progress', 'junit'],
|
||||
files:[
|
||||
'test/spec/polyfills.js',
|
||||
'client/src/vendor.js',
|
||||
path.join(NODE_MODULES, 'angular-mocks/angular-mocks.js'),
|
||||
path.join(SRC_PATH, 'app.js'),
|
||||
@ -35,6 +35,18 @@ module.exports = config => {
|
||||
outputDir: 'reports',
|
||||
outputFile: 'results.spec.xml',
|
||||
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 webpackConfig = require('../../build/webpack.test.js');
|
||||
|
||||
process.env.CHROME_BIN = require('puppeteer').executablePath();
|
||||
|
||||
const SRC_PATH = path.resolve(__dirname, '../../client/src');
|
||||
|
||||
const webpackConfig = require('./webpack.unit');
|
||||
|
||||
module.exports = config => {
|
||||
config.set({
|
||||
basePath: '',
|
||||
@ -11,10 +12,9 @@ module.exports = config => {
|
||||
autoWatch: false,
|
||||
colors: true,
|
||||
frameworks: ['jasmine'],
|
||||
browsers: ['PhantomJS'],
|
||||
browsers: ['chromeHeadless'],
|
||||
reporters: ['progress', 'junit'],
|
||||
files: [
|
||||
'./polyfills.js',
|
||||
path.join(SRC_PATH, 'vendor.js'),
|
||||
path.join(SRC_PATH, 'app.js'),
|
||||
path.join(SRC_PATH, '**/*.html'),
|
||||
@ -24,7 +24,7 @@ module.exports = config => {
|
||||
'karma-webpack',
|
||||
'karma-jasmine',
|
||||
'karma-junit-reporter',
|
||||
'karma-phantomjs-launcher',
|
||||
'karma-chrome-launcher',
|
||||
'karma-html2js-preprocessor'
|
||||
],
|
||||
preprocessors: {
|
||||
@ -41,6 +41,18 @@ module.exports = config => {
|
||||
outputDir: 'reports',
|
||||
outputFile: 'results.unit.xml',
|
||||
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
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user