chore: Configure Playwright for test111.nxtgauge.com testing

- Add TEST_ENV environment variable support
- Use production URL when TEST_ENV=production
- Disable webServer when testing production
This commit is contained in:
Ashwin Kumar Sivakumar 2026-07-06 22:03:06 +05:30
parent 2cb4d52fb3
commit 53ec112b50

View file

@ -8,7 +8,7 @@ export default defineConfig({
workers: process.env.CI ? 4 : undefined,
reporter: [["list"], ["html", { outputFolder: "./playwright-reports/html" }]],
use: {
baseURL: "http://localhost:3000",
baseURL: process.env.TEST_ENV === 'production' ? "https://test111.nxtgauge.com" : "http://localhost:3000",
trace: "on-first-retry",
screenshot: "only-on-failure",
video: "retain-on-failure",
@ -23,7 +23,7 @@ export default defineConfig({
use: { ...devices["Pixel 5"] },
},
],
webServer: {
webServer: process.env.TEST_ENV === 'production' ? undefined : {
command: "npm run build && node .output/server/index.mjs",
url: "http://localhost:3000",
reuseExistingServer: !process.env.CI,