-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathwct.conf.js
executable file
·55 lines (50 loc) · 1.56 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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: 360 * 1000,
verbose: false,
plugins: {
local: {
browserOptions: {
chrome: [
'headless',
'disable-gpu',
'no-sandbox'
]
}
}
},
registerHooks: function(context) {
const testBrowsers = [
{
'deviceName': 'Android GoogleAPI Emulator',
'platformName': 'Android',
'platformVersion': '11.0',
'browserName': 'Chrome',
'appium:chromeDriver': {
w3c: false,
},
},
'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;
}
}
};