2026-03-02 21:44:03 +08:00
|
|
|
import { defineConfig, devices } from '@playwright/test'
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
testDir: './tests',
|
|
|
|
|
timeout: 60 * 1000,
|
|
|
|
|
expect: {
|
|
|
|
|
timeout: 5 * 1000
|
|
|
|
|
},
|
2026-03-06 02:02:59 +08:00
|
|
|
reporter: [
|
|
|
|
|
['html', { open: 'never', outputFolder: 'playwright-report' }],
|
|
|
|
|
['json', { outputFile: 'test-results/results.json' }],
|
|
|
|
|
['list']
|
|
|
|
|
],
|
2026-03-02 21:44:03 +08:00
|
|
|
use: {
|
2026-03-06 02:02:59 +08:00
|
|
|
baseURL: process.env.ERP_BASE_URL || 'http://localhost:5183',
|
2026-03-02 21:44:03 +08:00
|
|
|
headless: true,
|
|
|
|
|
viewport: { width: 1440, height: 900 },
|
|
|
|
|
ignoreHTTPSErrors: true,
|
2026-03-06 02:02:59 +08:00
|
|
|
screenshot: 'on',
|
|
|
|
|
video: 'on',
|
|
|
|
|
trace: 'on'
|
2026-03-02 21:44:03 +08:00
|
|
|
},
|
|
|
|
|
projects: [
|
|
|
|
|
{
|
|
|
|
|
name: 'chromium',
|
|
|
|
|
use: { ...devices['Desktop Chrome'] }
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
|