fix: E2E测试标题步骤placeholder不匹配+AI自动选择模式处理 #1298

Closed
xiaoxia wants to merge 1 commits from fix/e2e-title-placeholder-v2 into develop
+6 -1
View File
@@ -210,8 +210,13 @@ test.describe("Core generation flow", () => {
// Step 5: title
await expect(page.getByRole("heading", { name: /选择标题/ })).toBeVisible({ timeout: 15000 })
// 如果 AI 自动选择标题模式开启,先切换到手动模式以显示输入框
const aiSwitch = page.locator(".xx-title-ai-toggle .xx-switch.active")
if (await aiSwitch.isVisible({ timeout: 2000 }).catch(() => false)) {
await aiSwitch.click()
}
const titleText = `E2E Test ${suffix}`
await page.getByPlaceholder("输入自定义标题…").fill(titleText)
await page.getByPlaceholder("输入或从标题库选择…").fill(titleText)
await page.getByRole("button", { name: "下一步" }).click()
// Step 6: cover (默认 AI 智能选帧模式,直接下一步)