-
Notifications
You must be signed in to change notification settings - Fork 121
/
protractor.conf.js
60 lines (52 loc) · 2.13 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
'use strict';
var path = require('path');
var ScreenShotReporter = require('protractor-html-screenshot-reporter');
exports.config = {
seleniumArgs: ['-browserTimeout=60'],
capabilities: {
'phantomjs.binary.path':'./node_modules/phantomjs/bin/phantomjs',
'phantomjs.cli.args': ['--ignore-ssl-errors=true', '--web-security=false'],
'version' : '',
'platform': 'ANY'
},
//framework: 'jasmine2',
/**
* A callback function called once protractor is ready and available,
* and before the specs are executed.
*
* You can specify a file containing code to run by setting onPrepare to
* the filename string.
*/
onPrepare: function() {
browser.driver.manage().window().setSize(1024,768);
/**
* At this point, global 'protractor' object will be set up, and
* jasmine will be available.
*
* The require statement must be down here, since jasmine-reporters
* needs jasmine to be in the global and protractor does not guarantee
* this until inside the onPrepare function.
*/
var jasmineReporters = require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
consolidateAll: true,
filePrefix: 'xmloutput',
savePath: './test-reports/e2e-test-report'
}));
// Add a screenshot reporter and store screenshots to `/test/test-reports/screenshots`:
jasmine.getEnv().addReporter(new ScreenShotReporter({
baseDirectory: './test-reports/screenshots',
pathBuilder: function pathBuilder(spec, descriptions, results, capabilities) {
// Return '<browser>/<specname>' as path for screenshots:
// Example: 'firefox/list-should work'.
return path.join(capabilities.caps_.browserName, descriptions.join('-'));
},
takeScreenShotsOnlyForFailedSpecs: true
}));
},
// ----- Options to be passed to minijasminenode -----
jasmineNodeOpts: {
// If true, display spec names.
isVerbose: true
}
};