Skip to content
Snippets Groups Projects
Commit 611c7522 authored by Alexandre Ducarne's avatar Alexandre Ducarne
Browse files

Merge branch 'feature/CI' into 'develop'

Improved Spec reporter

See merge request !4
parents e38fb603 405d9eb0
No related branches found
No related tags found
2 merge requests!5Develop,!4Improved Spec reporter
{
}
\ No newline at end of file
......@@ -4,7 +4,7 @@ const path = require('path');
exports.config = {
allScriptsTimeout: 11000,
// seleniumAddress: 'http://localhost:4444/wd/hub'
//seleniumAddress: 'http://localhost:4444/wd/hub',
// The port to start the selenium server on, or null if the server should
// find its own unused port.
......@@ -30,9 +30,11 @@ exports.config = {
framework: 'jasmine',
onPrepare: function() {
jasmine.getEnv().addReporter(new SpecReporter({spec: {displayStacktrace: true}}));
// Add a screenshot reporter:
jasmine.getEnv().addReporter(new HtmlReporter({
preserveDirectory: false,
preserveDirectory: true,
takeScreenShotsOnlyForFailedSpecs: true,
screenshotsSubfolder: 'images',
jsonsSubfolder: 'jsons',
......@@ -47,13 +49,14 @@ exports.config = {
const day = currentDate.getDate();
const month = currentDate.getMonth() + 1;
const year = currentDate.getFullYear();
const time = currentDate.getHours() + ':' + currentDate.getMinutes() + '-' + currentDate.getSeconds();
const validDescriptions = descriptions.map(function(description) {
return description.replace('/', '@');
});
return path.join(
day + '-' + month + '-' + year,
day + '-' + month + '-' + year +'-'+ time,
validDescriptions.join('-'));
},
}).getJasmine2Reporter());
......@@ -64,7 +67,4 @@ exports.config = {
defaultTimeoutInterval: 30000,
print: function() {},
},
onPrepare: function() {
jasmine.getEnv().addReporter(new SpecReporter({spec: {displayStacktrace: true}}));
},
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment