fix: stabilize web e2e locale and timeout
This commit is contained in:
@@ -13,6 +13,12 @@ const API_PORT = process.env.API_PORT ?? '3001';
|
||||
const WEB_PORT = process.env.WEB_PORT ?? '3000';
|
||||
|
||||
const SERVER_STARTUP_TIMEOUT_MS = process.env.CI ? 300_000 : 60_000;
|
||||
const VIETNAMESE_BROWSER_CONTEXT = {
|
||||
locale: 'vi-VN',
|
||||
extraHTTPHeaders: {
|
||||
'Accept-Language': 'vi-VN,vi;q=0.9,en;q=0.8',
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Playwright E2E configuration for Goodgo Platform.
|
||||
@@ -57,6 +63,7 @@ export default defineConfig({
|
||||
testDir: './e2e/web',
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
...VIETNAMESE_BROWSER_CONTEXT,
|
||||
baseURL: process.env.WEB_BASE_URL ?? `http://localhost:${WEB_PORT}`,
|
||||
},
|
||||
},
|
||||
@@ -75,6 +82,7 @@ export default defineConfig({
|
||||
grep: /@smoke/,
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
...VIETNAMESE_BROWSER_CONTEXT,
|
||||
baseURL: process.env.WEB_BASE_URL ?? `http://localhost:${WEB_PORT}`,
|
||||
},
|
||||
},
|
||||
@@ -84,6 +92,7 @@ export default defineConfig({
|
||||
testDir: './e2e/a11y',
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
...VIETNAMESE_BROWSER_CONTEXT,
|
||||
baseURL: process.env.WEB_BASE_URL ?? `http://localhost:${WEB_PORT}`,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user