-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzalenium.conf.js
65 lines (59 loc) · 1.52 KB
/
zalenium.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
require("@babel/register");
const { config: baseConfig } = require("./local.conf.js");
const deepmerge = require("deepmerge");
const ZaleniumService = require("../services/Zalenium.service").default;
delete baseConfig.user;
delete baseConfig.key;
// Filter BrowserStack service
baseConfig.services = (baseConfig.services || []).filter(s => {
const service = Array.isArray(s) ? s[0] : s;
return !(service.includes && service.includes("browserstack"));
});
module.exports.config = deepmerge(baseConfig, {
// user: process.env.BROWSER_STACK_USER,
// key: process.env.BROWSER_STACK_PSW,
hostname: "127.0.0.1",
protocol: "http",
automationProtocol: "webdriver",
port: 4444,
path: "/wd/hub",
services: [
[
ZaleniumService,
{
host: "http://127.0.0.1",
port: "4444",
build: "edge"
}
]
// ,
// [
// "browserstack",
// {
// browserstackLocal: false,
// preferScenarioName: true
// }
// ]
],
browserstackLocal: false,
beforeSession: function (config, capabilities, specs) {
baseConfig.beforeSession &&
baseConfig.beforeSession(config, capabilities, specs);
}
});
module.exports.config.capabilities = module.exports.config.capabilities.map(
(cap, opts = (cap["bstack:options"] = {})) =>
deepmerge(cap, {
"cjson:metadata": {
device:
cap.deviceName ||
cap.device ||
cap.deviceName ||
opts.device,
platform: {
name: cap.os || opts.os,
version: cap.osVersion || opts.osVersion
}
}
})
);