fix: stabilize web e2e locale and timeout

This commit is contained in:
Ho Ngoc Hai
2026-05-04 18:34:41 +07:00
parent dd67045e00
commit f112045826
5 changed files with 54 additions and 19 deletions

View File

@@ -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}`,
},
},