This repository has been archived by the owner on Jan 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
karma-saucelabs.conf.js
121 lines (109 loc) · 2.33 KB
/
karma-saucelabs.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
'use strict';
const karmaSauceLauncher = require('karma-sauce-launcher');
const karmaConfig = require('./karma.conf.js');
module.exports = function(config) {
karmaConfig(config);
const launchers = {
sl_chrome: {
base: 'SauceLabs',
browserName: 'chrome'
},
sl_chrome_57: {
base: 'SauceLabs',
browserName: 'chrome',
version: '57'
},
sl_safari_9: {
base: 'SauceLabs',
browserName: 'safari',
version: '9'
},
sl_safari_10: {
base: 'SauceLabs',
browserName: 'safari',
version: '10'
},
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox'
},
sl_firefox_53: {
base: 'SauceLabs',
browserName: 'firefox',
version: '53'
},
sl_ie_10: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 7',
version: '10'
},
sl_ie_11: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8.1',
version: '11'
},
sl_edge_20: {
base: 'SauceLabs',
browserName: 'microsoftedge',
platform: 'Windows 10',
version: '13'
},
sl_iphone: {
base: 'SauceLabs',
browserName: 'iphone',
platform: 'OS X 10.10',
version: '9.2'
},
sl_android_4: {
base: 'SauceLabs',
browserName: 'android',
platform: 'Linux',
version: '4.4'
},
sl_android_5: {
base: 'SauceLabs',
browserName: 'android',
platform: 'Linux',
version: '5.0'
}
};
let sauceLabsAccessKey = process.env.SAUCE_ACCESS_KEY;
if (!sauceLabsAccessKey) {
sauceLabsAccessKey = process.env.SAUCE_ACCESS_KEY_ENC;
if (sauceLabsAccessKey) {
sauceLabsAccessKey = new Buffer(sauceLabsAccessKey, 'base64').toString('binary');
}
}
config.set({
browsers: Object.keys(launchers),
browserDisconnectTimeout: 10000,
browserDisconnectTolerance: 2,
browserNoActivityTimeout: 240000,
captureTimeout: 240000,
customLaunchers: launchers,
plugins: [
'karma-chai',
'karma-chrome-launcher',
'karma-mocha',
'karma-sinon',
'karma-webpack',
karmaSauceLauncher
],
reporters: ['dots', 'saucelabs'],
sauceLabs: {
accessKey: sauceLabsAccessKey,
connectOptions: {
port: 4445,
logfile: 'sauce_connect.log'
},
recordScreenshots: false,
recordVideo: false,
startConnect: false,
testName: 'metal-ajax tests',
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
username: process.env.SAUCE_USERNAME
}
});
};