-
Notifications
You must be signed in to change notification settings - Fork 4
/
playwright.config.ts
29 lines (25 loc) · 894 Bytes
/
playwright.config.ts
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
import { defineConfig, devices } from "@playwright/test";
import path from "path";
import { fileURLToPath } from "url";
import { TestOptions, getDirectories } from "./tests/e2e/fixtures.ts";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const playgroundDir = path.join(__dirname, "playground");
const playgroundBuilds = await getDirectories(playgroundDir);
export default defineConfig<TestOptions>({
testDir: "./tests/e2e",
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: process.env.CI ? "dot" : "list",
use: {
trace: "on-first-retry",
},
projects: playgroundBuilds.map((playgroundBuild) => ({
name: playgroundBuild,
use: {
...devices["Desktop Chrome"],
extensionPath: path.join(`${playgroundDir}/${playgroundBuild}/dist`),
},
})),
});