fix(e2e): update generation API URL pattern in core-generation test #1455
Reference in New Issue
Block a user
Delete Branch "fix/e2e-generation-url-pattern"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题
Staging E2E Tests 中
core-generation.spec.ts:55的walks through 7-step wizard and starts generation测试持续失败,原因是page.waitForResponse等待 30s 超时。根因:
waitForResponse匹配的是POST /confirm或POST /editor/generate,但前端实际调用的是POST /generation/tasks,URL 永远匹配不上,导致超时失败。最近 5 次 develop push 的 Staging E2E Tests 全部因此失败。
修复
将 URL 匹配条件改为
path.endsWith("/generation/tasks"),与前端实际 API 一致。验收标准
core-generation.spec.ts:55的 waitForResponse 匹配正确的 API 路径The waitForResponse was matching POST /confirm or /editor/generate, but the frontend actually calls POST /generation/tasks directly. This caused the 30s timeout to fire and the test to fail. Updated the URL matcher to match path.endsWith('/generation/tasks').【阻塞级判定】
📊 审查概览
🔴 阻塞级问题(必须修复)
无
💡 改进建议(不阻塞合并)
无
✅ 良好实践
🤖 由 AI 代码审查机器人自动生成 | 2026-08-21 04:09:05 | 模型:
CI全绿,自动审批通过。
CI全绿,自动审批通过。
🚀 预览环境已部署
🗑️ 预览环境已清理
PR #1455 已关闭或合并,对应的预览环境已被清理。