-
Notifications
You must be signed in to change notification settings - Fork 8
/
protractor.conf.js
77 lines (74 loc) · 2.25 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
/* jshint node: true */
/* global browser */
var config = {
SELENIUM_PROMISE_MANAGER: false,
framework: 'jasmine2',
specs: [
'test/*.js'
],
multiCapabilities: [{
browserName: 'chrome',
chromeOptions: {
'args': ['--headless']
}
},
{
browserName: 'firefox'
}],
jasmineNodeOpts: {
isVerbose: true,
showTiming: true,
defaultTimeoutInterval: 90000,
showColors: true,
includeStackTrace: true
},
baseUrl: 'http://localhost:' + (process.env.PORT || 8080) + '/',
// Up the timeouts for the slower browsers (IE, Safari).
allScriptsTimeout: 30000,
getPageTimeout: 30000,
onPrepare: function () {
browser.ignoreSynchronization = true;
var _get = browser.get;
var sleepInterval = process.env.TRAVIS ? 14000 : 8000;
browser.get = function () {
var result = _get.apply(this, arguments);
browser.sleep(sleepInterval);
return result;
};
}
};
if (process.env.TRAVIS) {
config.sauceUser = process.env.SAUCE_USERNAME;
config.sauceKey = process.env.SAUCE_ACCESS_KEY;
config.multiCapabilities = [{
browserName: 'MicrosoftEdge',
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
build: process.env.TRAVIS_BUILD_NUMBER,
name: 'Lindat Common build ' + process.env.TRAVIS_BUILD_NUMBER
}, {
// For some reason Firefox doesn't work very well in SauceLabs (or I can't use it)
// SEE:
// - https://github.com/angular/protractor/issues/480
// - http://stackoverflow.com/questions/26740123/protractor-click-then-failing-in-firefox
browserName: 'firefox',
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
build: process.env.TRAVIS_BUILD_NUMBER,
name: 'Lindat Common build ' + process.env.TRAVIS_BUILD_NUMBER
}, {
browserName: 'chrome',
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
build: process.env.TRAVIS_BUILD_NUMBER,
name: 'Lindat Common build ' + process.env.TRAVIS_BUILD_NUMBER
}
];
} else {
var glob = require('glob');
glob('./node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-*.jar', function (err, files) {
if(err){
throw err;
}else{
config.seleniumServerJar = files[files.length - 1];
}
});
}
exports.config = config;