Skip to content

Commit e498360

Browse files
committed
fix: e2e tests after the config change
1 parent e7e6ee3 commit e498360

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

playwright.config.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ export default defineConfig({
6767
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
6868
use: {
6969
/* Base URL to use in actions like `await page.goto('/')`. */
70-
baseURL: "https://localhost:8000",
70+
baseURL: process.env.VITE_APP_DOMAIN
71+
? `https://${process.env.VITE_APP_DOMAIN}:${process.env.VITE_LOCAL_PORT || 8000}`
72+
: "https://localhost:8000",
7173

7274
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
7375
trace: "on",
@@ -79,8 +81,8 @@ export default defineConfig({
7981
},
8082

8183
webServer: {
82-
command: "npm run build && npm run preview",
83-
port: 8000,
84+
command: "npm run dev",
85+
port: process.env.VITE_LOCAL_PORT ? Number(process.env.VITE_LOCAL_PORT) : 8000,
8486
reuseExistingServer: !process.env.CI,
8587
stderr: "pipe",
8688
stdout: "pipe",

0 commit comments

Comments
 (0)