forked from superdesk/superdesk-client-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
protractor-conf.js
66 lines (55 loc) · 1.68 KB
/
protractor-conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
'use strict';
var path = require('path');
function getChromeOptions() {
var chromeOptions = {
args: ['no-sandbox']
};
if (process.env.CHROME_BIN) {
chromeOptions.binary = process.env.CHROME_BIN;
}
return chromeOptions;
}
var config = {
allScriptsTimeout: 34000,
baseUrl: 'http://localhost:9000',
params: {
baseBackendUrl: 'http://localhost:5000/api/',
username: 'admin',
password: 'admin'
},
suites: {
a: path.join(__dirname, '/spec/**/[a-f]*[Ss]pec.js'),
b: path.join(__dirname, '/spec/**/[g-m]*[Ss]pec.js'),
c: path.join(__dirname, '/spec/**/[n-z]*[Ss]pec.js')
},
framework: 'jasmine2',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 200000
},
capabilities: {
browserName: 'chrome',
chromeOptions: getChromeOptions()
},
directConnect: true,
onPrepare: function() {
require('./spec/helpers/setup')({fixture_profile: 'app_prepopulate_data'});
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) {
var name = result.fullName.split(' ');
console.log('at Object.<anonymous> (spec/' + name[0] + '_spec.js:0:0)');
}
};
}
jasmine.getEnv().addReporter(new CustomReporter());
}
};
exports.config = config;