Page-wide project-name text hits both the top bar and the session rail after restart. Click the complementary exact title, then assert the banner exact name. Split Playwright output and HTML reports by UI_PHASE so post-restart cannot wipe main traces. Co-authored-by: Cursor <cursoragent@cursor.com>
48 lines
1.5 KiB
TypeScript
48 lines
1.5 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
import * as path from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
import { playwrightArtifactDirNames } from './src/lib/playwrightPhaseArtifacts';
|
|
|
|
/**
|
|
* 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.
|
|
* outputDir / HTML report are split by UI_PHASE so post-restart cannot wipe main traces.
|
|
*/
|
|
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',
|
|
);
|
|
const phaseDirs = playwrightArtifactDirNames(process.env.UI_PHASE);
|
|
|
|
export default defineConfig({
|
|
testDir: './e2e',
|
|
fullyParallel: false,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: 0,
|
|
workers: 1,
|
|
timeout: 600_000,
|
|
outputDir: path.join(evidenceRoot, phaseDirs.outputDirName),
|
|
reporter: [
|
|
['list'],
|
|
['html', { open: 'never', outputFolder: path.join(evidenceRoot, phaseDirs.reportDirName) }],
|
|
],
|
|
use: {
|
|
baseURL: process.env.BASE_URL || 'http://127.0.0.1:8080',
|
|
headless: true,
|
|
actionTimeout: 30_000,
|
|
locale: 'zh-CN',
|
|
trace: runAcceptance ? 'on' : 'off',
|
|
screenshot: runAcceptance ? 'on' : 'off',
|
|
video: runAcceptance ? 'on' : 'off',
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
});
|