Files
Agent-System/web/playwright.config.ts
T
weichenandCursor bd53984790 test(web): rewrite DOCREV UI acceptance without false PASS paths
Require observed squad start before terminal status, dual high-risk
confirm/reject, computed overlay diffs, real A/B contexts, UI logout,
and UI_PHASE post-restart evidence. Sanitize network paths; no mocks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 10:53:35 +00:00

44 lines
1.3 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test';
import * as path from 'path';
import { fileURLToPath } from 'url';
/**
* Ubuntu Server headless UI acceptance config (DOCREV runtime).
* Enable only when RUN_UI_ACCEPTANCE=1 against a real dev stack — no mocks.
* Script never touches docker; UI_PHASE=post-restart is a second run after host restart.
*/
const runAcceptance = process.env.RUN_UI_ACCEPTANCE === '1';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const evidenceRoot = path.resolve(
__dirname,
'../../.doc/test-reports/assets/2026-09-13-document-revision-runtime-ui',
);
export default defineConfig({
testDir: './e2e',
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: 0,
workers: 1,
timeout: 600_000,
outputDir: path.join(evidenceRoot, 'playwright-output'),
reporter: [
['list'],
['html', { open: 'never', outputFolder: path.join(evidenceRoot, 'playwright-report') }],
],
use: {
baseURL: process.env.BASE_URL || 'http://127.0.0.1:8080',
headless: true,
locale: 'zh-CN',
trace: runAcceptance ? 'on' : 'off',
screenshot: runAcceptance ? 'on' : 'off',
video: runAcceptance ? 'on' : 'off',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
});