This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
forked from prebid/Prebid.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wdio.conf.js
69 lines (66 loc) · 2.17 KB
/
wdio.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
const browsers = Object.fromEntries(
Object.entries(require('./browsers.json'))
.filter(([k, v]) => {
// run only on latest; exclude Safari
// (Webdriver's `browser.url(...)` times out on Safari if the page loads a video; does it wait for playback to complete?)
return v.browser_version === 'latest' && v.browser !== 'safari'
})
);
function getCapabilities() {
function getPlatform(os) {
const platformMap = {
'Windows': 'WINDOWS',
'OS X': 'OS X',
}
return platformMap[os];
}
let capabilities = []
Object.values(browsers).forEach(browser => {
capabilities.push({
browserName: browser.browser,
browserVersion: browser.browser_version,
'bstack:options': {
os: getPlatform(browser.os),
osVersion: browser.os_version,
networkLogs: true,
consoleLogs: 'verbose',
buildName: `Prebidjs E2E (${browser.browser} ${browser.browser_version}) ${new Date().toLocaleString()}`
},
acceptInsecureCerts: true,
});
});
return capabilities;
}
exports.config = {
specs: [
'./test/spec/e2e/**/*.spec.js',
],
exclude: [
// TODO: decipher original intent for "longform" tests
// they all appear to be almost exact copies
'./test/spec/e2e/longform/**/*'
],
services: [
['browserstack', {
browserstackLocal: true
}]
],
user: process.env.BROWSERSTACK_USERNAME,
key: process.env.BROWSERSTACK_ACCESS_KEY,
maxInstances: 5, // Do not increase this, since we have only 5 parallel tests in browserstack account
maxInstancesPerCapability: 1,
capabilities: getCapabilities(),
logLevel: 'info', // put option here: info | trace | debug | warn| error | silent
bail: 0,
waitforTimeout: 60000, // Default timeout for all waitFor* commands.
connectionRetryTimeout: 60000, // Default timeout in milliseconds for request if Selenium Grid doesn't send response
connectionRetryCount: 3, // Default request retries count
framework: 'mocha',
mochaOpts: {
ui: 'bdd',
timeout: 60000,
compilers: ['js:babel-register'],
},
// if you see error, update this to spec reporter and logLevel above to get detailed report.
reporters: ['spec']
}