forked from wix-incubator/wix-gruntfile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
protractor-teamcity-conf.js
67 lines (60 loc) · 1.61 KB
/
protractor-teamcity-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
/* global process, exports, jasmine */
'use strict';
var config = require('./protractor-conf').config;
if (process.env.BUILD_NUMBER !== '12345') {
var onPrepare = config.onPrepare || function () {};
config.onPrepare = function () {
require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmine.TeamcityReporter());
onPrepare.apply(this, arguments);
};
}
config.sauceUser = process.env.SAUCE_USERNAME;
config.sauceKey = process.env.SAUCE_ACCESS_KEY;
var sauceLabsBrowsers = {
Chrome: {
browserName: 'chrome',
platform: 'Windows 8'
},
FF: {
browserName: 'firefox',
platform: 'Windows 7'
},
IE11: {
browserName: 'internet explorer',
version: '11',
platform: 'Windows 8.1'
},
IE10: {
browserName: 'internet explorer',
version: '10',
platform: 'Windows 8'
},
IE9: {
browserName: 'internet explorer',
version: '9',
platform: 'Windows 7'
},
Safari7: {
browserName: 'safari',
version: '7',
platform: 'OS X 10.9'
},
Safari6: {
browserName: 'safari',
version: '6',
platform: 'OS X 10.8'
}
};
var testBrowsers = (process.env.SAUCE_BROWSERS ? process.env.SAUCE_BROWSERS.split(' ') : Object.keys(sauceLabsBrowsers));
config.multiCapabilities = testBrowsers.map(function (key) {
var browser = sauceLabsBrowsers[key];
browser.name = 'e2e tests';
browser['tunnel-identifier'] = process.env.BUILD_NUMBER;
browser['screen-resolution'] = '1280x1024';
browser.build = process.env.BUILD_NUMBER;
browser.shardTestFiles = true;
browser.maxInstances = 3;
return sauceLabsBrowsers[key];
});
exports.config = config;