fix(e2e): update generation API URL pattern in core-generation test
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 45s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 46s
AI Code Review / AI Code Review (pull_request) Successful in 1m37s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m42s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m22s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 2m8s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 1m44s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m40s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 7m6s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 7m58s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 19m3s
CI/CD Pipeline / CI Gate (pull_request) Successful in 8s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 42s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 1m14s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 626h59m43s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 626h59m44s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 626h59m45s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 626h59m47s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 626h59m47s
CI/CD Pipeline / PR Build Worker Image (pull_request) Failing after 627h18m1s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 627h18m5s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 627h18m46s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 627h18m47s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 627h18m49s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 627h18m50s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 627h18m51s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 627h33m29s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 627h33m32s
CI/CD Pipeline / PR Build API Image (pull_request) Failing after 627h51m49s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 627h52m33s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 627h52m36s

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').
This commit is contained in:
CI Bot
2026-08-21 12:07:15 +08:00
parent f08a2bfa0d
commit 6b34acff3f
+2 -3
View File
@@ -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 },