Skip to content

Commit 38763c7

Browse files
committed
refactor: simplify E2E server setup by using vite directly
- Remove dev:e2e script from package.json (no longer needed) - Update playwright.config.ts to call vite directly without strictPort - Removes conditional webServer logic for CI - E2E tests can now reuse existing dev server on port 5173
1 parent ebf426b commit 38763c7

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

frontend/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"type": "module",
55
"scripts": {
66
"dev": "FRONTEND_PORT=${FRONTEND_PORT:-5173} vite dev --port ${FRONTEND_PORT:-5173} --strictPort",
7-
"dev:e2e": "FRONTEND_PORT=${FRONTEND_PORT:-5173} vite dev --port ${FRONTEND_PORT:-5173}",
87
"build": "vite build",
98
"preview": "vite preview",
109
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",

frontend/playwright.config.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,11 @@ export default defineConfig({
6969
],
7070

7171
// Auto-start frontend if not running (optional)
72-
// Uses dev:e2e script without --strictPort to allow reusing existing dev server
73-
// In CI or when FRONTEND_URL responds, this will reuse the existing server
74-
webServer: !CI
75-
? {
76-
command: "bun run dev:e2e",
77-
url: FRONTEND_URL,
78-
reuseExistingServer: true,
79-
timeout: 120_000,
80-
}
81-
: undefined,
72+
// Note: Uses vite directly without --strictPort to allow reusing existing server
73+
webServer: {
74+
command: "FRONTEND_PORT=${FRONTEND_PORT:-5173} vite dev --port ${FRONTEND_PORT:-5173}",
75+
url: FRONTEND_URL,
76+
reuseExistingServer: true,
77+
timeout: 120_000,
78+
},
8279
});

0 commit comments

Comments
 (0)