Skip to content

Instantly share code, notes, and snippets.

@fouad-j
Created May 4, 2017 07:05
Show Gist options
  • Save fouad-j/0c1c5ad9f1620a7aea1e0bc951dac863 to your computer and use it in GitHub Desktop.
Save fouad-j/0c1c5ad9f1620a7aea1e0bc951dac863 to your computer and use it in GitHub Desktop.
var HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter');
var reporter = new HtmlScreenshotReporter({
dest: 'target/screenshots',
filename: 'my-report.html',
userCss: 'e2e/reporter.css'
});
exports.config = {
framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['./e2e/**.spec.js'],
suites: {
md5Sha1Hashing: './e2e/md5Sha1Hashing.spec.js',
passwordGenerator: './e2e/passwordGenerator.spec.js'
},
jasmineNodeOpts: {
showColors: true
},
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: ['headless', 'window-size=1280x1024']
}
},
highlightDelay: 1000,
beforeLaunch: function() {
return new Promise(function(resolve) {
reporter.beforeLaunch(resolve);
});
},
onPrepare: function() {
jasmine.getEnv().addReporter(reporter);
},
afterLaunch: function(exitCode) {
return new Promise(function(resolve) {
reporter.afterLaunch(resolve.bind(this, exitCode));
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment