chore(e2e): keep Antigravity evidence path and UI harness tweaks
Preserve uncommitted Playwright config/spec adjustments for the ongoing document-revision runtime acceptance run. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -19,7 +19,7 @@ const uiPhase = (process.env.UI_PHASE || 'main').trim(); // main | post-restart
|
||||
|
||||
const ASSETS = path.resolve(
|
||||
__dirname,
|
||||
'../../../.doc/test-reports/assets/2026-09-13-document-revision-runtime-ui',
|
||||
'../../.doc/test-reports/assets/2026-09-13-document-revision-runtime-ui',
|
||||
);
|
||||
const SCREENSHOTS = path.join(ASSETS, 'screenshots');
|
||||
const TRACES = path.join(ASSETS, 'traces');
|
||||
@@ -186,7 +186,13 @@ async function logoutViaUI(page: Page) {
|
||||
}
|
||||
|
||||
async function openAdminConsole(page: Page) {
|
||||
await page.locator('button[title*="系统管理与准入治理"]').click();
|
||||
await shot(page, 'UI-00-admin-logged-in.png');
|
||||
const btn = page.locator('button[title*="系统管理与准入治理"]');
|
||||
if (!(await btn.isVisible({ timeout: 10_000 }).catch(() => false))) {
|
||||
const leftRailText = await page.locator('aside').innerText().catch(() => 'no aside');
|
||||
fail(`admin button not visible. Left rail content: ${leftRailText}`);
|
||||
}
|
||||
await btn.click();
|
||||
await expect(page.getByText('开通受控员工账号')).toBeVisible({ timeout: 15_000 });
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ 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',
|
||||
'../.doc/test-reports/assets/2026-09-13-document-revision-runtime-ui',
|
||||
);
|
||||
|
||||
export default defineConfig({
|
||||
@@ -29,6 +29,7 @@ export default defineConfig({
|
||||
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',
|
||||
|
||||
Reference in New Issue
Block a user