Files
Agent-System-Frontend/e2e/__probe10.playwright.ts
T
weichen ffda9961dc Capture cockpit console in e2e scenario 1
Why: scenario 1 hangs at 加载中 in the e2e environment; surface the
component console through the spec annotation to locate it.

Evidence: tsc green (SELF).

Impact: spec-only debug capture; removed once the cause is fixed.
2026-10-16 15:50:59 +00:00

17 lines
841 B
TypeScript

import { test } from '@playwright/test'
test('probe10', async ({ page }) => {
const logs: string[] = []
page.on('console', m => { const t = m.text(); if (t.includes('[cockpit-dbg]')) logs.push(t) })
page.on('pageerror', e => logs.push('PAGEERR: ' + e.message.slice(0, 150)))
await page.goto('http://127.0.0.1:4173/')
await page.getByPlaceholder('由管理员分配').fill('e2e-auditor')
await page.getByPlaceholder('初始密码或常用密码').fill('E2eAudit#2026b')
await page.getByRole('button', { name: '登录', exact: true }).click()
await page.waitForTimeout(4000)
await page.locator('.tsb-tool', { hasText: '文档驾驶舱' }).click()
await page.waitForTimeout(12000)
const sel = await page.locator('.cockpit-project').count()
console.log('FINAL-SELECT:', sel)
console.log('LOGS:\n' + logs.join('\n'))
})