ruffle/web/packages/selfhosted/wdio.conf.ts

91 lines
2.0 KiB
TypeScript
Raw Normal View History

import type { Options, Services } from "@wdio/types";
const capabilities: WebdriverIO.Capabilities[] = [];
const services: Services.ServiceEntry[] = [];
const headless = process.argv.includes("--headless");
const chrome = process.argv.includes("--chrome");
const firefox = process.argv.includes("--firefox");
const edge = process.argv.includes("--edge");
if (chrome) {
const args = ["--disable-gpu"];
if (headless) {
args.push("--headless");
}
capabilities.push({
"wdio:maxInstances": 1,
browserName: "chrome",
"goog:chromeOptions": {
args,
},
});
services.push("chromedriver");
}
if (edge) {
const args = ["--disable-gpu"];
if (headless) {
args.push("--headless");
}
capabilities.push({
"wdio:maxInstances": 1,
browserName: "MicrosoftEdge",
"ms:edgeOptions": {
args,
},
});
services.push("edgedriver");
}
if (firefox) {
const args = [];
if (headless) {
args.push("-headless");
}
capabilities.push({
"wdio:maxInstances": 1,
browserName: "firefox",
"moz:firefoxOptions": {
args,
},
});
services.push("geckodriver");
}
services.push([
"static-server",
{
folders: [
{ mount: "/dist", path: "./dist" },
{ mount: "/test_assets", path: "./test_assets" },
{ mount: "/test", path: "./test" },
],
port: 4567,
},
]);
export const config: Options.Testrunner = {
2020-05-23 09:43:22 +00:00
runner: "local",
specs: [
"./test/polyfill/**/test.ts",
"./test/js_api/*.ts",
"./test/integration_tests/**/test.ts",
],
2020-05-23 09:43:22 +00:00
maxInstances: 10,
capabilities,
2020-05-23 09:43:22 +00:00
logLevel: "info",
bail: 0,
baseUrl: "http://localhost",
waitforTimeout: 30000,
2020-05-23 09:43:22 +00:00
connectionRetryTimeout: 120000,
connectionRetryCount: 3,
services,
2020-05-23 09:43:22 +00:00
framework: "mocha",
reporters: ["spec"],
mochaOpts: {
ui: "bdd",
timeout: 120000,
2020-05-23 09:43:22 +00:00
},
};