-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathwdio.conf.js
More file actions
54 lines (53 loc) · 1.23 KB
/
wdio.conf.js
File metadata and controls
54 lines (53 loc) · 1.23 KB
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
const FRED_PORT = process.env.FRED_PORT || "3000";
/** @type {WebdriverIO.Config} */
export const config = {
runner: "local",
specs: ["./test/specs/**/*.js"],
maxInstances: 10,
capabilities: [
{
browserName: "firefox",
browserVersion: "stable",
"moz:firefoxOptions": {
args: ["-headless"],
},
},
],
services: [
[
"firefox-profile",
{
// Give the test framework permissions to read the clipboard:
"dom.events.testing.asyncClipboard": true,
"dom.events.testing.asyncClipboard.readText": true,
},
],
],
logLevel: "error",
framework: "mocha",
reporters: ["spec"],
mochaOpts: {
ui: "bdd",
timeout: 120_000,
},
baseUrl: `http://localhost:${FRED_PORT}/`,
async before(_, __, browser) {
console.log("waiting for servers to start");
await browser.waitUntil(
async () => {
try {
await browser.url(`http://localhost:${FRED_PORT}`);
await browser.url("http://localhost:8083");
return true;
} catch {
return false;
}
},
{
timeout: 30_000,
timeoutMsg: "Server not available after 30 seconds",
interval: 1000,
},
);
},
};