json e2e reports
parent
fff4e94f3b
commit
8dcef424ce
|
@ -14,4 +14,5 @@ tmp/
|
||||||
app/config/main.coffee
|
app/config/main.coffee
|
||||||
scss-lint.log
|
scss-lint.log
|
||||||
e2e/screenshots/
|
e2e/screenshots/
|
||||||
|
e2e/reports/
|
||||||
app/modules/compile-modules/
|
app/modules/compile-modules/
|
||||||
|
|
24
conf.e2e.js
24
conf.e2e.js
|
@ -2,8 +2,9 @@ require("babel-register");
|
||||||
require("babel-polyfill");
|
require("babel-polyfill");
|
||||||
|
|
||||||
var utils = require('./e2e/utils');
|
var utils = require('./e2e/utils');
|
||||||
|
var argv = require('minimist')(process.argv.slice(2));
|
||||||
|
|
||||||
exports.config = {
|
var config = {
|
||||||
seleniumAddress: 'http://localhost:4444/wd/hub',
|
seleniumAddress: 'http://localhost:4444/wd/hub',
|
||||||
framework: 'mocha',
|
framework: 'mocha',
|
||||||
params: {
|
params: {
|
||||||
|
@ -101,8 +102,6 @@ exports.config = {
|
||||||
// };
|
// };
|
||||||
// browser.addMockModule('trackMouse', trackMouse);
|
// browser.addMockModule('trackMouse', trackMouse);
|
||||||
|
|
||||||
var argv = require('minimist')(process.argv.slice(2));
|
|
||||||
|
|
||||||
browser.params.glob.back = argv.back;
|
browser.params.glob.back = argv.back;
|
||||||
|
|
||||||
require('./e2e/capabilities.js');
|
require('./e2e/capabilities.js');
|
||||||
|
@ -140,4 +139,23 @@ exports.config = {
|
||||||
return browser.get(browser.params.glob.host);
|
return browser.get(browser.params.glob.host);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
if (argv.json) {
|
||||||
|
var fs = require('fs');
|
||||||
|
var dir = './e2e/reports';
|
||||||
|
|
||||||
|
if (!fs.existsSync(dir)){
|
||||||
|
fs.mkdirSync(dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
var suites = argv.suite.split(',').join('-');
|
||||||
|
|
||||||
|
process.env['MOCHA_REPORTER'] = 'JSON';
|
||||||
|
process.env['MOCHA_REPORTER_FILE'] = 'e2e/reports/report-' + suites +'.json';
|
||||||
|
|
||||||
|
config.mochaOpts.reporter = 'reporter-file';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exports.config = config;
|
||||||
|
|
|
@ -84,11 +84,12 @@
|
||||||
"merge-stream": "^1.0.0",
|
"merge-stream": "^1.0.0",
|
||||||
"minimist": "^1.1.1",
|
"minimist": "^1.1.1",
|
||||||
"mocha": "^2.2.4",
|
"mocha": "^2.2.4",
|
||||||
"node-uuid": "^1.4.3",
|
|
||||||
"node-sass": "3.6.0",
|
"node-sass": "3.6.0",
|
||||||
|
"node-uuid": "^1.4.3",
|
||||||
"photoswipe": "^4.1.0",
|
"photoswipe": "^4.1.0",
|
||||||
"pre-commit": "^1.0.5",
|
"pre-commit": "^1.0.5",
|
||||||
"readable-stream": "~2.1.2",
|
"readable-stream": "~2.1.2",
|
||||||
|
"reporter-file": "^1.0.0",
|
||||||
"run-sequence": "^1.0.2",
|
"run-sequence": "^1.0.2",
|
||||||
"sinon": "^1.14.1",
|
"sinon": "^1.14.1",
|
||||||
"through2": "^2.0.1",
|
"through2": "^2.0.1",
|
||||||
|
|
|
@ -35,7 +35,13 @@ function backup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function launchProtractor(suit) {
|
function launchProtractor(suit) {
|
||||||
child_process.spawnSync('protractor', ['conf.e2e.js', '--suite=' + suit, '--back=' + taigaBackPath], {stdio: "inherit"});
|
let protractorParams = ['conf.e2e.js', '--suite=' + suit, '--back=' + taigaBackPath];
|
||||||
|
|
||||||
|
if (argv.json) {
|
||||||
|
protractorParams.push('--json');
|
||||||
|
}
|
||||||
|
|
||||||
|
child_process.spawnSync('protractor', protractorParams, {stdio: "inherit"});
|
||||||
}
|
}
|
||||||
|
|
||||||
function restoreBackup() {
|
function restoreBackup() {
|
||||||
|
|
Loading…
Reference in New Issue