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
This commit is contained in:
肖应宇 2026-04-15 13:24:42 +08:00
parent 9be0c6823b
commit 4739e81e83
1 changed files with 11 additions and 3 deletions

View File

@ -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 (