From 6b34acff3f8f913661cde693f35c5feac73c092d Mon Sep 17 00:00:00 2001 From: CI Bot Date: Fri, 21 Aug 2026 12:07:15 +0800 Subject: [PATCH] fix(e2e): update generation API URL pattern in core-generation test 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'). --- apps/web/e2e/core-generation.spec.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/web/e2e/core-generation.spec.ts b/apps/web/e2e/core-generation.spec.ts index a9e648074..f260da572 100755 --- a/apps/web/e2e/core-generation.spec.ts +++ b/apps/web/e2e/core-generation.spec.ts @@ -226,15 +226,14 @@ test.describe("Core generation flow", () => { await expect(page.getByRole("heading", { name: /确认生成/ })).toBeVisible() // Wait for generation API to be called - // 确认生成走新流程:POST /tasks/{taskId}/confirm(复用预览产物) - // 或旧流程:POST /editor/generate(向后兼容) + // 前端直接创建生成任务:POST /generation/tasks const generatePromise = page.waitForResponse( (response) => { const url = response.url() const path = new URL(url).pathname return ( response.request().method() === "POST" && - (path.endsWith("/confirm") || path.endsWith("/editor/generate")) + path.endsWith("/generation/tasks") ) }, { timeout: 30_000 }, -- 2.54.0