-
Notifications
You must be signed in to change notification settings - Fork 0
/
bs.conf.js
91 lines (85 loc) · 1.87 KB
/
bs.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
87
88
89
90
91
const merge = require("deepmerge");
const path = require("path");
const child = require("child_process");
require("@babel/register");
const { config: baseConfig } = require("./../../e2e/configs/cucumber.conf");
const { CI_BRANCH, CI_COMMIT, GITHUB_SHA, GITHUB_HEAD_REF } = process.env;
const
branch = CI_BRANCH || GITHUB_HEAD_REF,
revision = CI_COMMIT || GITHUB_SHA;
const baseCapability = {
"bstack:options": {
debug: true,
local: true,
// localIdentifier: localIdentifier,
resolution: "1920x1080",
seleniumVersion: "4.0.0-alpha-2",
projectName: baseConfig.project || "FedEx",
appiumVersion: "1.17.0",
timezone: "Europe/Amsterdam",
buildName: `${branch} @ ${revision}`,
userName: process.env.BROWSER_STACK_USER,
accessKey: process.env.BROWSER_STACK_PSW
}
// "moz:firefoxOptions": {
// prefs: {
// "dom.storage.enabled": true,
// },
// },
};
const capabilities = [
{
browserName: "chrome",
"bstack:options": {
os: "Windows",
osVersion: "10"
}
},
{
browserName: "firefox",
"bstack:options": {
os: "Windows",
osVersion: "10"
}
},
{
browserName: "Edge",
"bstack:options": {
os: "Windows",
osVersion: "10"
}
},
{
"bstack:options": {
os: "Windows",
osVersion: "10",
ie: {
noFlash: "true",
enablePopups: "true"
},
seleniumVersion: "3.141.59"
},
browserName: "IE",
browserVersion: "11.0"
}
];
module.exports.config = merge(baseConfig, {
user: process.env.BROWSER_STACK_USER,
key: process.env.BROWSER_STACK_PSW,
capabilities: baseConfig.filterCaps(
capabilities.map(cap => merge(baseCapability, cap))
),
browserstackLocal: true,
services: [
[ "browserstack", {
browserstackLocal: true,
preferScenarioName: true,
opts: {
browserstackLocal: true,
verbose: true,
logFile: path.join(baseConfig._LOGS, "tunnel.log"),
key: process.env.BROWSER_STACK_PSW
}
}]
]
});