-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
55 lines (51 loc) · 1.22 KB
/
playwright.config.ts
File metadata and controls
55 lines (51 loc) · 1.22 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
55
import { defineConfig, devices } from "@playwright/test";
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: "./tests",
fullyParallel: false, // Audio tests should not run in parallel
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: 1, // Run tests sequentially to avoid audio conflicts
reporter: "html",
use: {
baseURL: "http://localhost:3000",
trace: "on-first-retry",
},
projects: [
{
name: "chromium",
use: {
...devices["Desktop Chrome"],
permissions: ["microphone"],
launchOptions: {
args: [
"--use-fake-ui-for-media-stream", // Auto-accept permission prompts
"--use-fake-device-for-media-stream", // Use fake camera/mic
],
},
},
},
{
name: "firefox",
use: {
...devices["Desktop Firefox"],
launchOptions: {
firefoxUserPrefs: {
// Auto-grant microphone permissions
"media.navigator.permission.disabled": true,
// Use fake media devices
"media.navigator.streams.fake": true,
},
},
},
},
],
webServer: {
command: "bunx serve . -p 3000 --no-port-switching",
port: 3000,
reuseExistingServer: !process.env.CI,
timeout: 120000,
},
});