-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.smoke.ts
More file actions
65 lines (62 loc) · 1.69 KB
/
playwright.config.smoke.ts
File metadata and controls
65 lines (62 loc) · 1.69 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
56
57
58
59
60
61
62
63
64
65
import { defineConfig, devices } from "@playwright/test";
import baseConfig from "./playwright.config";
/**
* Smoke tests most likely to surface cross-browser regressions locally.
* Chromium/Mobile Chrome run the full smoke suite; Firefox/Mobile Safari run a
* targeted subset locally and the full smoke suite in CI.
*/
const CROSS_BROWSER_SUBSET = [
"**/responsive-overflow.spec.ts",
"**/navigation.spec.ts",
"**/public-reporting.spec.ts",
];
const isCI = !!process.env["CI"];
export default defineConfig({
...baseConfig,
testDir: "./e2e/smoke",
fullyParallel: true,
workers: isCI ? 3 : 2,
retries: isCI ? 2 : 0,
projects: [
{
name: "auth-setup",
testDir: "./e2e",
testMatch: "auth.setup.ts",
fullyParallel: false, // Serialize to prevent Supabase cookie rotation races
use: { ...devices["Desktop Chrome"] },
},
{
name: "chromium",
use: {
...devices["Desktop Chrome"],
viewport: { width: 1024, height: 768 },
},
dependencies: ["auth-setup"],
},
{
name: "Mobile Chrome",
use: { ...devices["Pixel 5"] },
dependencies: ["auth-setup"],
},
{
name: "firefox",
use: {
...devices["Desktop Firefox"],
viewport: { width: 1024, height: 768 },
},
...(!isCI && { testMatch: CROSS_BROWSER_SUBSET }),
dependencies: ["auth-setup"],
},
{
name: "Mobile Safari",
use: {
...devices["iPhone 12"],
viewport: { width: 375, height: 812 },
},
...(!isCI && { testMatch: CROSS_BROWSER_SUBSET }),
retries: isCI ? 3 : 1,
timeout: isCI ? 120 * 1000 : 60 * 1000,
dependencies: ["auth-setup"],
},
],
});