forked from diafygi/webrtc-ips
-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathkarma-sauce.conf.js
86 lines (75 loc) · 2.12 KB
/
karma-sauce.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
// Sauce platform configurator:
// https://wiki.saucelabs.com/display/DOCS/Platform+Configurator
const baseFn = require('./karma.conf');
module.exports = function (config) {
if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) {
console.log('Make sure the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are set.');
process.exit(1)
}
baseFn(config);
// enable leaking local IP
// see: https://github.com/karma-runner/karma-sauce-launcher/issues/240
const chromeOptions = {
args: [
'--flag-switches-begin',
'--disable-features=WebRtcHideLocalIpsWithMdns',
'--flag-switches-end'
]
};
const customLaunchers = {
chrome_latest_win10: {
base: 'SauceLabs',
browserName: 'Chrome',
platform: 'Windows 10',
version: 'latest',
'goog:chromeOptions': chromeOptions
},
firefox_latest_win10: {
base: 'SauceLabs',
browserName: 'Firefox',
platform: 'Windows 10',
version: 'latest',
'moz:firefoxOptions': {
prefs: {
'media.peerconnection.ice.obfuscate_host_addresses': false
}
}
},
chrome_latest_osx: {
base: 'SauceLabs',
browserName: 'Chrome',
platform: 'macOS 10.13',
version: 'latest',
'goog:chromeOptions': chromeOptions
},
chrome_latest_android: {
base: 'SauceLabs',
browserName: 'Chrome',
appiumVersion: '1.8.1',
platformName: 'Android',
platformVersion: '7.0',
deviceName: 'Samsung Galaxy S7 GoogleAPI Emulator',
'goog:chromeOptions': chromeOptions
},
edge_latest_win10: {
base: 'SauceLabs',
browserName: 'MicrosoftEdge',
platform: 'Windows 10',
version: 'latest',
'ms:edgeOptions': chromeOptions
},
};
config.set({
sauceLabs: {
testName: 'webrtc-ips',
recordScreenshots: false,
public: 'public'
},
// Increase timeout in case connection in CI is slow
captureTimeout: 120 * 1000,
customLaunchers: customLaunchers,
browsers: Object.keys(customLaunchers),
reporters: ['dots', 'saucelabs'],
singleRun: true
})
};