-
Notifications
You must be signed in to change notification settings - Fork 5
/
wct.conf.js
40 lines (36 loc) · 1.33 KB
/
wct.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
var envIndex = process.argv.indexOf('--env') + 1;
var env = envIndex ? process.argv[envIndex] : undefined;
// workaround for Android 7+ blocking all HTTP traffic
// see https://wiki.saucelabs.com/display/DOCS/Known+Issues
// add it to your own local `/etc/hosts` to run SauceLabs tests locally
var tunneledLocalhost = 'localhost-for-saucelabs';
module.exports = {
testTimeout: 180 * 1000,
verbose: false,
registerHooks: function(context) {
const testBrowsers = [
{
deviceName: 'Android GoogleAPI Emulator',
platformName: 'Android',
platformVersion: '11.0',
browserName: 'Chrome',
},
'iOS Simulator/iphone@10.3', // should be 9.x, but SauceLabs does not provide that
'macOS 11/safari@latest',
'Windows 10/microsoftedge@latest',
'Windows 10/microsoftedge@18',
'Windows 10/internet explorer@11',
'Windows 10/chrome@latest',
'Windows 10/firefox@latest',
'Windows 10/firefox@78', // latest ESR as of 2021-06-30
];
if (env === 'saucelabs') {
context.options.webserver = context.options.webserver || {};
context.options.webserver.hostname = tunneledLocalhost;
context.options.plugins.sauce.tunnelOptions = {
tunnelDomains: tunneledLocalhost
};
context.options.plugins.sauce.browsers = testBrowsers;
}
}
};