opt-cc/static/protractor-html-reporter.co...

54 lines
1.4 KiB
JavaScript
Raw Permalink Normal View History

2017-05-21 01:26:14 +02:00
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/docs/referenceConf.js
/*global jasmine */
var SpecReporter = require('jasmine-spec-reporter');
//var ScreenshotProcessor = require('./e2e/helpers/screen_shot_reporter.ts');
var HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter');
var reporter = new HtmlScreenshotReporter({
dest: 'tmp/screenshots',
filename: 'test-report.html',
cleanDestination: true,
ignoreSkippedSpecs: true,
captureOnlyFailedSpecs: false
});
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'firefox'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
2017-09-03 12:49:59 +02:00
print: function () {
}
2017-05-21 01:26:14 +02:00
},
useAllAngular2AppRoots: true,
2017-09-03 12:49:59 +02:00
beforeLaunch: function () {
2017-05-21 01:26:14 +02:00
require('ts-node').register({
project: 'e2e'
});
2017-09-03 12:49:59 +02:00
return new Promise(function (resolve) {
2017-05-21 01:26:14 +02:00
reporter.beforeLaunch(resolve);
});
},
2017-09-03 12:49:59 +02:00
afterLaunch: function (exitCode) {
return new Promise(function (resolve) {
2017-05-21 01:26:14 +02:00
reporter.afterLaunch(resolve.bind(this, exitCode));
});
},
2017-09-03 12:49:59 +02:00
onPrepare: function () {
2017-05-21 01:26:14 +02:00
jasmine.getEnv().addReporter(reporter);
jasmine.getEnv().addReporter(new SpecReporter());
},
2017-09-03 12:49:59 +02:00
};