import { defineConfig } from '@playwright/test';
const baseURL = process.env.E2E_BASE_URL || 'http://localhost:7120';
export default defineConfig({
testDir: './tests',
globalSetup: './tests/global-setup.ts',
fullyParallel: false,
workers: 1,
retries: process.env.CI ? 1 : 0,
timeout: 60_000,
expect: { timeout: 10_000 },
reporter: [['list'], ['html', { open: 'never' }]],
use: {
baseURL,
locale: 'zh-CN',
screenshot: 'only-on-failure',
trace: 'retain-on-failure',
viewport: { width: 1440, height: 900 },
storageState: '.auth/admin.json',
},
webServer: process.env.E2E_NO_WEBSERVER
? undefined
: {
command: 'dotnet run --project ../CubeDemo/TDesignCubeDemo.csproj --no-build --no-launch-profile',
url: baseURL,
reuseExistingServer: true,
timeout: 180_000,
env: {
ASPNETCORE_ENVIRONMENT: 'Development',
ASPNETCORE_URLS: baseURL,
},
},
});
|