test: verify forest AI MVP unification
This commit is contained in:
@@ -519,7 +519,7 @@ if (desktopLoginMetrics.title !== '森林AI') failures.push(`unexpected title ${
|
||||
if (desktopColumnCount !== 2) failures.push(`desktop login must use two columns, got ${desktopLoginMetrics.columns}`)
|
||||
|
||||
await page.setViewportSize({ width: 390, height: 844 })
|
||||
await page.screenshot({ path: 'test-results/login-react-acro-mobile.png', fullPage: true })
|
||||
await page.screenshot({ path: 'test-results/login-react-acro-mobile.png' })
|
||||
const mobileLoginMetrics = await collectLoginMetrics()
|
||||
const mobileColumnCount = getColumnCount(mobileLoginMetrics.columns)
|
||||
if (mobileLoginMetrics.overflowX) failures.push('mobile login must not overflow horizontally')
|
||||
@@ -566,7 +566,10 @@ await page.screenshot({ path: 'test-results/project-react-acro-light.png', fullP
|
||||
const projectMetrics = await collectMetrics()
|
||||
|
||||
await page.setViewportSize({ width: 390, height: 844 })
|
||||
await page.waitForFunction(() => [...document.querySelectorAll('.project-rail, .channel-sidebar')]
|
||||
.every((node) => getComputedStyle(node).visibility === 'hidden'))
|
||||
const mobileProjectMetrics = await collectMetrics()
|
||||
await page.screenshot({ path: 'test-results/project-react-acro-mobile.png', fullPage: true })
|
||||
const projectNavButton = page.getByRole('button', { name: '打开项目导航', exact: true })
|
||||
if (await projectNavButton.count() === 0) {
|
||||
failures.push('missing mobile button 打开项目导航')
|
||||
@@ -1003,6 +1006,9 @@ for (const channel of [
|
||||
]) {
|
||||
await page.locator('.channel-button', { hasText: channel.label }).click()
|
||||
await page.waitForTimeout(250)
|
||||
if (channel.label === '工作计划') {
|
||||
await page.screenshot({ path: 'test-results/project-tasks.png', fullPage: true })
|
||||
}
|
||||
if (channel.label === 'AI 助手') {
|
||||
const aiPage = page.locator('.project-ai-page')
|
||||
await aiPage.getByText('项目风险梳理', { exact: true }).waitFor({ state: 'visible', timeout: 2000 })
|
||||
|
||||
Reference in New Issue
Block a user