forked from liferay/alloy-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma-saucelabs.js
80 lines (70 loc) · 1.67 KB
/
karma-saucelabs.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
'use strict';
const Common = require('./karma.common');
const karmaSauceLauncher = require('karma-sauce-launcher');
let sauceLabsAccessKey = process.env.SAUCE_ACCESS_KEY_ENC;
if (sauceLabsAccessKey) {
sauceLabsAccessKey = new Buffer(sauceLabsAccessKey, 'base64').toString(
'binary'
);
}
var customLaunchers = {
sl_chrome_linux: {
base: 'SauceLabs',
browserName: 'chrome',
},
sl_firefox: {
base: 'SauceLabs',
browserName: 'firefox',
},
sl_ie_11: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 10',
version: '11',
},
sl_edge_22: {
base: 'SauceLabs',
browserName: 'microsoftedge',
platform: 'Windows 10',
version: 'latest',
},
};
const defaultConfig = Object.assign(Common, {
browsers: Object.keys(customLaunchers),
browserDisconnectTimeout: 10000,
browserDisconnectTolerance: 2,
browserNoActivityTimeout: 240000,
captureTimeout: 240000,
customLaunchers: customLaunchers,
plugins: [
'karma-babel-preprocessor',
'karma-coverage',
'karma-html2js-preprocessor',
'karma-chai',
'karma-fixture',
'karma-mocha',
'karma-sinon',
'karma-webpack',
karmaSauceLauncher,
],
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress', 'saucelabs'],
// soucelabs specific configuration
sauceLabs: {
accessKey: sauceLabsAccessKey,
testName: 'AlloyEditor tests',
recordVideo: false,
recordScreenshots: false,
startConnect: true,
connectOptions: {
'no-ssl-bump-domains': 'all',
port: 5757,
logfile: 'sauce_connect.log',
},
},
});
module.exports = function(config) {
config.set(defaultConfig);
};