fix(e2e): 更新生成流程E2E测试适配7步新流程 #663

Merged
auto-approve-bot merged 1 commits from fix/e2e-generation-7step-flow into develop 2026-07-21 00:37:49 +08:00
+12 -4
View File
@@ -52,7 +52,7 @@ type AssetListResponse = {
test.describe("Core generation flow", () => {
test.describe.configure({ timeout: 180_000 })
test("walks through 5-step wizard and starts generation", async ({ page, request }) => {
test("walks through 7-step wizard and starts generation", async ({ page, request }) => {
test.setTimeout(180_000)
await routeBrowserApiToTestApi(page)
@@ -196,19 +196,27 @@ test.describe("Core generation flow", () => {
await materialLabel.locator("input[type='checkbox']").check()
await page.getByRole("button", { name: "下一步" }).click()
// Step 3: title
// Step 3: preview (纯展示页,AI 智能匹配预览)
await expect(page.getByRole("heading", { name: /生成预览/ })).toBeVisible()
await page.getByRole("button", { name: "下一步" }).click()
// Step 4: title
await expect(page.getByRole("heading", { name: /选择标题/ })).toBeVisible()
const titleText = `E2E Test ${suffix}`
await page.getByPlaceholder("输入自定义标题…").fill(titleText)
await page.getByRole("button", { name: "下一步" }).click()
// Step 4: voice
// Step 5: voice
await expect(page.getByRole("heading", { name: /选择配音/ })).toBeVisible()
const firstVoiceCard = page.locator(".xx-voice-choice-item").first()
await firstVoiceCard.click()
await page.getByRole("button", { name: "下一步" }).click()
// Step 5: confirm and generate
// Step 6: cover (默认 AI 智能选帧模式,直接下一步)
await expect(page.getByRole("heading", { name: /选择封面/ })).toBeVisible()
await page.getByRole("button", { name: "下一步" }).click()
// Step 7: confirm and generate
await expect(page.getByRole("heading", { name: /确认生成/ })).toBeVisible()
// Wait for plan creation API to be called