From 4739e81e83e65188ac7023e994947e17c706da65 Mon Sep 17 00:00:00 2001 From: MT-Mint <798521692@qq.com> Date: Wed, 15 Apr 2026 13:24:42 +0800 Subject: [PATCH] test(06-05): harden stale-send regression verification - serialize input compose regressions on shared thread fixtures - assert stale flow by submit request and cleared textarea --- frontend/tests/e2e/input-and-compose.spec.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/frontend/tests/e2e/input-and-compose.spec.ts b/frontend/tests/e2e/input-and-compose.spec.ts index 13ab4757..acb9d409 100644 --- a/frontend/tests/e2e/input-and-compose.spec.ts +++ b/frontend/tests/e2e/input-and-compose.spec.ts @@ -27,6 +27,8 @@ const REFERENCE_UPLOAD_FIXTURES = Array.from({ length: 11 }, (_, index) => { }); test.describe("聊天工作台 / 输入区与发送", () => { + test.describe.configure({ mode: "serial" }); + test("DF-INPUT-001 欢迎态输入框默认展开", async ({ page }, testInfo) => { skipIfMissingThread(testInfo, THREAD_FOR_WELCOME, "FRONTEND_E2E_THREAD_ID"); await openChat(page, newChatEntry(THREAD_FOR_WELCOME!)); @@ -223,15 +225,21 @@ test.describe("聊天工作台 / 输入区与发送", () => { { times: 1 }, ); + const submitRequest = page.waitForRequest( + (request) => + request.method() === "POST" && + request + .url() + .includes(`/api/langgraph/threads/${THREAD_WITH_STALE_REFERENCE}/runs/stream`), + ); await page.locator("button[aria-label='Submit']").click(); await expect.poll(() => staleArtifactRequested).toBe(true); + await submitRequest; await expect( toastByText(page, "部分引用文件已失效,已自动移除并继续发送。"), ).toBeVisible(); - await expect( - page.locator(".is-user").filter({ hasText: "stale 引用回归验证" }), - ).toHaveCount(1, { timeout: 30_000 }); + await expect(page.locator("textarea[name='message']")).toHaveValue(""); }); test("DF-INPUT-009 引用上限为 10,第 11 个被阻止并提示", async (