Skip to content

Instantly share code, notes, and snippets.

@PrashantBhatasana
Created June 6, 2019 08:34
Show Gist options
  • Save PrashantBhatasana/f32eaabb3045b97b2639781a81474962 to your computer and use it in GitHub Desktop.
Save PrashantBhatasana/f32eaabb3045b97b2639781a81474962 to your computer and use it in GitHub Desktop.
Demo protractor configuration file with `protractor-jasmine2-html-reporter` intergation.
var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter');
exports.config = {
// The address of a running selenium server.
seleniumAddress: 'http://localhost:4444/wd/hub',
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'firefox'
},
// Spec patterns are relative to the location of the spec file. They may
// include glob patterns.
suites: {
login: 'tests/e2e/home/login.spec.js'
},
// Options to be passed to Jasmine-node.
jasmineNodeOpts: {
showColors: true, // Use colors in the command line report.
},
baseUrl: "https://hidden-bayou-97469.herokuapp.com/us/#!/",
/******************** protractor-jasmine2-html-reporter */
onPrepare: function () {
jasmine.getEnv().addReporter(
new Jasmine2HtmlReporter({
savePath: './tests/results',
takeScreenshotsOnlyOnFailures: true,
cleanDestination: false,
fileNameDateSuffix: true
})
);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment