test(visual): allow playwright port override and rebaseline connections-mobile
Add PLAYWRIGHT_PORT env var to playwright.config.js so a worktree can run its own dev server on a different port without disrupting the main dev server. Rebaseline connections-mobile-auth which had drifted from the suggestions data state captured during Phase 1.
This commit is contained in:
parent
127d2974c8
commit
e260ed5b37
2 changed files with 6 additions and 3 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 135 KiB |
|
|
@ -1,5 +1,8 @@
|
||||||
import { defineConfig } from "@playwright/test";
|
import { defineConfig } from "@playwright/test";
|
||||||
|
|
||||||
|
const PORT = process.env.PLAYWRIGHT_PORT || "3000";
|
||||||
|
const BASE_URL = `http://localhost:${PORT}`;
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
testDir: "./e2e",
|
testDir: "./e2e",
|
||||||
outputDir: "e2e/test-results",
|
outputDir: "e2e/test-results",
|
||||||
|
|
@ -11,7 +14,7 @@ export default defineConfig({
|
||||||
reporter: "html",
|
reporter: "html",
|
||||||
timeout: 60000,
|
timeout: 60000,
|
||||||
use: {
|
use: {
|
||||||
baseURL: "http://localhost:3000",
|
baseURL: BASE_URL,
|
||||||
trace: "on-first-retry",
|
trace: "on-first-retry",
|
||||||
navigationTimeout: 45000,
|
navigationTimeout: 45000,
|
||||||
},
|
},
|
||||||
|
|
@ -22,8 +25,8 @@ export default defineConfig({
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
webServer: {
|
webServer: {
|
||||||
command: "npm run build && NODE_ENV=development npm run preview",
|
command: `PORT=${PORT} npm run build && PORT=${PORT} NODE_ENV=development npm run preview`,
|
||||||
url: "http://localhost:3000",
|
url: BASE_URL,
|
||||||
reuseExistingServer: !process.env.CI,
|
reuseExistingServer: !process.env.CI,
|
||||||
env: {
|
env: {
|
||||||
NUXT_PUBLIC_COMING_SOON: "false",
|
NUXT_PUBLIC_COMING_SOON: "false",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue