2026-07-02 20:01:48 +08:00
|
|
|
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
testDir: './e2e',
|
|
|
|
|
fullyParallel: true,
|
|
|
|
|
forbidOnly: !!process.env.CI,
|
|
|
|
|
retries: 2,
|
|
|
|
|
workers: process.env.CI ? 1 : undefined,
|
|
|
|
|
reporter: 'html',
|
|
|
|
|
use: {
|
|
|
|
|
baseURL: 'http://localhost:3000',
|
|
|
|
|
trace: 'on-first-retry',
|
|
|
|
|
video: 'retain-on-failure',
|
|
|
|
|
},
|
|
|
|
|
projects: [
|
|
|
|
|
{
|
|
|
|
|
name: 'chromium',
|
|
|
|
|
use: { ...devices['Desktop Chrome'] },
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
webServer: {
|
2026-07-08 18:07:07 +08:00
|
|
|
command: 'node .next/standalone/server.js',
|
2026-07-02 20:01:48 +08:00
|
|
|
url: 'http://localhost:3000',
|
|
|
|
|
reuseExistingServer: !process.env.CI,
|
|
|
|
|
},
|
|
|
|
|
});
|