Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onPrepare: function() {
require('./client/spec/helpers/setup')({fixture_profile: 'planning_prepopulate_data'});
// so it can be used without import in tests
// useful when debugging on CI server
browser.screenshot = require('superdesk-core/spec/helpers/utils').screenshot;
var reporters = require('jasmine-reporters');
jasmine.getEnv().addReporter(
new reporters.JUnitXmlReporter({
savePath: 'e2e-test-results',
consolidateAll: true,
})
);
function CustomReporter() {
this.specDone = function(result) {
if (result.failedExpectations.length > 0) {
browser.screenshot(result.fullName.replace(/[^\w]+/g, '-'));
}
};
}