forked from eclipse-che/che
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprotractor.conf.js
More file actions
74 lines (62 loc) · 2.03 KB
/
Copy pathprotractor.conf.js
File metadata and controls
74 lines (62 loc) · 2.03 KB
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
67
68
69
70
71
72
73
74
'use strict';
var paths = {
src: 'src',
dist: 'dist',
tmp: '.tmp',
e2e: 'e2e'
},
HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter'),
reporter = new HtmlScreenshotReporter({
dest: 'target/protractor-tests-report',
filename: 'report.html',
showQuickLinks: true,
reportOnlyFailedSpecs: false,
captureOnlyFailedSpecs: true,
pathBuilder: function(currentSpec, suites, browserCapabilities) {
// will return chrome/your-spec-name.png
return browserCapabilities.get('browserName') + '/' + currentSpec.fullName;
}
});
// An example configuration file.
exports.config = {
// The address of a running selenium server.
//seleniumAddress: 'http://localhost:4444/wd/hub',
//seleniumServerJar: deprecated, this should be set on node_modules/protractor/config.json
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
args: ['--lang=en',
'--window-size=1280,800']
},
// uncomment lines below if you want to run more than one browser instance and share tests between them.
// it may cause test failures!
//'shardTestFiles': true,
//'maxInstances': 2
},
baseUrl: 'http://localhost:3000',
// Spec patterns are relative to the current working directory when
// protractor is called.
specs: [paths.e2e + '/**/*.js'],
// Options to be passed to Jasmine-node.
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000
},
// Setup the report before any tests start
beforeLaunch: function () {
return new Promise(function (resolve) {
reporter.beforeLaunch(resolve);
});
},
// Assign the test reporter to each running instance
onPrepare: function () {
jasmine.getEnv().addReporter(reporter);
},
// Close the report after all tests finish
afterLaunch: function (exitCode) {
return new Promise(function (resolve) {
reporter.afterLaunch(resolve.bind(this, exitCode));
});
}
};