forked from akveo/nebular
-
Notifications
You must be signed in to change notification settings - Fork 1
/
protractor.conf.js
84 lines (69 loc) · 2.32 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
const E2E_BASE_URL = process.env['E2E_BASE_URL'] || 'http://localhost:4200';
const config = {
useAllAngular2AppRoots: true,
allScriptsTimeout: 120000,
getPageTimeout: 120000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': ['show-fps-counter=true', '--no-sandbox']
}
},
// directConnect: true,
baseUrl: E2E_BASE_URL,
framework: 'jasmine',
directConnect: true,
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 120000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: 'e2e/tsconfig.e2e.json'
});
const failFast = require('jasmine-fail-fast');
jasmine.getEnv().addReporter(failFast.init());
jasmine.getEnv().addReporter(new SpecReporter({ acspec: { displayStacktrace: true } }));
}
};
if (process.env['TRAVIS']) {
const [platform] = process.env.MODE.split('_');
config.directConnect = false;
if (platform === 'sauce') {
const key = require('./scripts/ci/sauce/config');
config.sauceUser = process.env['SAUCE_USERNAME'];
config.sauceKey = key;
config.capabilities = {
'browserName': 'chrome',
'version': 'latest',
'tunnel-identifier': process.env['TRAVIS_JOB_ID'],
'build': process.env['TRAVIS_JOB_ID'],
'name': 'Nebular E2E Tests',
// Enables concurrent testing in the Webdriver. Currently runs five e2e files in parallel.
'maxInstances': 5,
'shardTestFiles': true,
// By default Saucelabs tries to record the whole e2e run. This can slow down the builds.
'recordVideo': false,
'recordScreenshots': false
};
} else if (platform === 'browserstack') {
const key = require('./scripts/ci/browserstack/config');
config.browserstackUser = process.env['BROWSER_STACK_USERNAME'];
config.browserstackKey = key;
config.capabilities = {
'browserstack.localIdentifier': process.env['TRAVIS_JOB_ID'],
'browserstack.local': 'true',
'build': process.env['TRAVIS_JOB_ID'],
'name': 'Nebular E2E Tests',
'browserName': 'chrome',
};
}
}
exports.config = config;