Files
OpenMesh/surfaces/gui/e2e/interrupt-partial.spec.ts
zhaolei 6f402ffcee
Some checks failed
CI / pytest (push) Has been cancelled
CI / gui-unit (push) Has been cancelled
CI / gui-e2e (push) Has been cancelled
feat: OpenMesh 基础平台与 MD/PDF 转换技能
- 后端: coworker 智能体框架, WS API, 文件上传, 附件处理
- 前端: Open WebUI, 文件全量走 upload API (含 MD/TXT/JSON 等文本类)
- 技能: md-to-office (pandoc + wkhtmltopdf)
- 修复: 上传文件路径丢失, Agent 搜索浪费, 输出文件跑到 uploads/
- 打包: PyInstaller one-dir, 预打包 pandoc/wkhtmltopdf/chromium
2026-09-13 23:41:04 +08:00

33 lines
1.5 KiB
TypeScript

// Owner-hit 2026-07-22: Stop mid-stream kept the partial visible — until the NEXT message's
// turn_start wiped it, because the partial only ever lived in the ephemeral streaming buffer
// (assistant_message is what promotes text into the transcript, and an interrupted turn never
// emits one). The fix flushes the buffer into a durable assistant item on interrupted/error.
import { expect } from "@playwright/test";
import { test } from "./fixtures";
test("interrupted partial stream survives the next turn", async ({ page }) => {
await page.goto("/");
await page.getByText("Draft the launch note").first().click();
const box = page.getByPlaceholder(/Ask the coworker/);
await box.fill("stream the epic");
await box.press("Enter");
// Let a few deltas land, then stop the turn.
await expect(page.getByText("The epic scrolls ever onward").first()).toBeVisible({
timeout: 10_000,
});
await page.getByRole("button", { name: /Stop/ }).click();
await expect(page.getByText("Interrupted.").first()).toBeVisible({ timeout: 5_000 });
// The partial is still on screen after the stop…
await expect(page.getByText("The epic scrolls ever onward").first()).toBeVisible();
// …and — the regression — still there after the next turn starts and completes.
await box.fill("continue please");
await box.press("Enter");
await expect(page.getByText("Echo: continue please", { exact: false }).first()).toBeVisible({
timeout: 10_000,
});
await expect(page.getByText("The epic scrolls ever onward").first()).toBeVisible();
});