test(e2e): #1954 用稳定的「下载」按钮断言代替易消失toast+封面选择器收紧 (#1960)
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 1s
CI/CD Pipeline / Check push changed paths (push) Successful in 1s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 2m47s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 3m30s
CI/CD Pipeline / Integration Tests (push) Successful in 3m39s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 4m3s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 4m5s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
CI/CD Pipeline / Validate - Style (push) Successful in 4m17s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 5m42s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 2m3s
CI/CD Pipeline / Validate - Security (push) Successful in 7m42s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 1m33s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m7s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 3m56s
CI/CD Pipeline / Unit Tests (push) Successful in 10m44s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Has been skipped

Co-authored-by: xiaoxia <dev@xiaoxiajianji.com>
Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
This commit was merged in pull request #1960.
This commit is contained in:
2026-09-16 12:33:17 +08:00
committed by auto-approve-bot
parent fc99b5a080
commit 410487fef5
+12 -12
View File
@@ -264,22 +264,22 @@ test.describe("Core generation flow", () => {
// 注意:进度页底部按钮变为 disabled 的「⏳ 视频渲染中…」
await expect(page.getByText("视频渲染中")).toBeVisible({ timeout: 30_000 })
// 等待渲染完成:进度卡变为「视频生成完成」(最长等待 3 分钟
await expect(page.getByText("视频生成完成")).toBeVisible({ timeout: 180_000 })
// 等待渲染完成:单视频成片播放器渲染(带「⬇️ 下载」按钮),最长等待 3 分钟
// 注意:message.success「视频生成完成」toast 3秒后自动消失,不能作为稳定断言点
await expect(page.getByRole("button", { name: "⬇️ 下载" })).toBeVisible({ timeout: 180_000 })
// #1954 修复:生成完成后步骤4底部应显示「下一步:选择封面」按钮,点击进入步骤5封面页
// #1954 修复:生成完成后步骤4底部应显示「下一步:选择封面」按钮
// 等待底部主按钮从「⏳/确认生成」切换为「下一步:选择封面」
const nextCoverBtn = page
.locator(".xx-step-actions .xx-btn-primary")
.filter({ hasText: "下一步:选择封面" })
await expect(nextCoverBtn).toBeVisible({ timeout: 10_000 })
.locator(".xx-step-actions > .xx-btn-primary")
.filter({ hasText: "选择封面" })
await expect(nextCoverBtn).toBeVisible({ timeout: 15_000 })
await nextCoverBtn.click()
// 断言进入步骤5步骤条应高亮「选择封面」,主内容出现「🖼️ 选择封面」标题
await expect(page.getByRole("heading", { name: "🖼️ 选择封面" })).toBeVisible({
timeout: 10_000,
})
// 主按钮应消失(封面是最后一步),仅保留「← 上一步」
await expect(page.locator(".xx-step-actions .xx-btn-primary")).toHaveCount(0)
// 断言进入步骤5封面页:主内容出现「选择封面」标题
await expect(page.getByText("🖼️ 选择封面")).toBeVisible({ timeout: 10_000 })
// 底部操作栏主按钮应消失(封面是最后一步,只剩「← 上一步」)
await expect(page.locator(".xx-step-actions > .xx-btn-primary")).toHaveCount(0)
} else {
console.log(`[E2E] Generate API returned ${genResp.status()}, wizard flow test still passes`)
// 创建失败时停留在标题页并展示错误提示