Why: U7 浏览器点验需要可复跑的固定制品用例(对实际 8788 入口)。 Evidence: 4/4 passed against rdm@4a10773(登录工作台/审计工作区/项目设置三页签/管理入口门控)+ 三张截图;收据在 RDM 任务卡。 Impact: 新增三份 e2e(PLAYWRIGHT_BASE_URL 驱动,未设时跳过);无运行时改动。 Refs: 方案 r1 U7;RDM frontend-pin 任务
20 lines
977 B
TypeScript
20 lines
977 B
TypeScript
import { test, expect } from '@playwright/test'
|
|
const OWNER = process.env.E2E_OWNER || 'u7-creator'
|
|
const PASSWORD = process.env.E2E_PASSWORD || 'U7-Final-creator!7'
|
|
test.skip(!process.env.PLAYWRIGHT_BASE_URL)
|
|
test('u7 工作台+审计截图', async ({ page }) => {
|
|
test.setTimeout(60_000)
|
|
await page.goto('/')
|
|
await expect(page.getByPlaceholder('由管理员分配')).toBeVisible({ timeout: 15_000 })
|
|
await page.getByPlaceholder('由管理员分配').fill(OWNER)
|
|
await page.getByPlaceholder('初始密码或常用密码').fill(PASSWORD)
|
|
await page.getByRole('button', { name: '登录', exact: true }).click()
|
|
await page.waitForTimeout(1200)
|
|
await page.screenshot({ path: 'test-results/u7-01-workbench.png' })
|
|
const audit = page.locator('.tsb-tool', { hasText: '追溯审计' })
|
|
await expect(audit).toBeVisible({ timeout: 15_000 })
|
|
await audit.click()
|
|
await page.waitForTimeout(1500)
|
|
await page.screenshot({ path: 'test-results/u7-02-audit.png' })
|
|
})
|