- 后端: coworker 智能体框架, WS API, 文件上传, 附件处理 - 前端: Open WebUI, 文件全量走 upload API (含 MD/TXT/JSON 等文本类) - 技能: md-to-office (pandoc + wkhtmltopdf) - 修复: 上传文件路径丢失, Agent 搜索浪费, 输出文件跑到 uploads/ - 打包: PyInstaller one-dir, 预打包 pandoc/wkhtmltopdf/chromium
33 lines
1.6 KiB
TypeScript
33 lines
1.6 KiB
TypeScript
import { test, expect } from "./fixtures";
|
|
|
|
// Automation runs open as live sessions — which used to look like any other chat with no way
|
|
// back (owner report, 2026-07-04). Guards: the run-session banner (task title + automation
|
|
// context) and "← Back to runs" returning to the task's detail page.
|
|
test("scheduled run session shows the run banner; Back returns to the task detail", async ({
|
|
page,
|
|
}) => {
|
|
await page.goto("/");
|
|
await page.getByTestId("nav-automations").click();
|
|
|
|
// Task list → detail (runs list).
|
|
await page.getByText("Daily AI News").first().click();
|
|
await expect(page.getByRole("button", { name: /Run now/ })).toBeVisible();
|
|
await expect(page.getByText("Each run is a live conversation", { exact: false })).toBeVisible();
|
|
|
|
// Open the running run: a normal session view, but with the automation-context banner.
|
|
await page.getByTitle("Open this run's conversation").click();
|
|
const banner = page.getByTestId("run-banner");
|
|
await expect(banner).toBeVisible();
|
|
await expect(banner).toContainText("Scheduled run");
|
|
await expect(banner).toContainText("Daily AI News");
|
|
|
|
// Back link lands on the SAME task's detail, not the bare list.
|
|
await banner.getByRole("button", { name: "← Back to runs" }).click();
|
|
await expect(page.getByRole("button", { name: /Run now/ })).toBeVisible();
|
|
await expect(page.getByText("Daily AI News").first()).toBeVisible();
|
|
|
|
// A plain (non-run) session never shows the banner.
|
|
await page.getByText("Draft the launch note").first().click();
|
|
await expect(page.getByTestId("run-banner")).toHaveCount(0);
|
|
});
|