fix playwright config: use chromium, remove remote debugging

This commit is contained in:
Zhi
2026-03-13 18:57:44 +00:00
parent e727933e21
commit 47b9eecf9f

View File

@@ -1,8 +1,7 @@
import { defineConfig, devices } from '@playwright/test'; import { defineConfig, devices } from '@playwright/test';
const baseURL = process.env.BASE_URL || 'http://127.0.0.1:3000'; const baseURL = process.env.FRONTEND_URL || 'http://frontend:3000';
const webServerURL = process.env.WEB_SERVER_URL || baseURL; const backendURL = process.env.BACKEND_URL || 'http://backend:8000';
const chromeDebuggingPort = process.env.CHROME_DEBUGGING_PORT || '9222';
export default defineConfig({ export default defineConfig({
testDir: './tests', testDir: './tests',
@@ -14,22 +13,16 @@ export default defineConfig({
use: { use: {
baseURL, baseURL,
trace: 'on-first-retry', trace: 'on-first-retry',
launchOptions: {
args: [`--remote-debugging-port=${chromeDebuggingPort}`],
},
}, },
projects: [ projects: [
{ {
name: 'chromium', name: 'chromium',
use: { use: { ...devices['Desktop Chrome'] },
...devices['Desktop Chrome'],
channel: 'chrome',
},
}, },
], ],
webServer: { webServer: {
command: 'npm run dev', command: 'npm run dev',
url: webServerURL, url: baseURL,
reuseExistingServer: !process.env.CI, reuseExistingServer: !process.env.CI,
}, },
}); });