feat: OpenMesh 基础平台与 MD/PDF 转换技能
Some checks failed
CI / pytest (push) Has been cancelled
CI / gui-unit (push) Has been cancelled
CI / gui-e2e (push) Has been cancelled

- 后端: coworker 智能体框架, WS API, 文件上传, 附件处理
- 前端: Open WebUI, 文件全量走 upload API (含 MD/TXT/JSON 等文本类)
- 技能: md-to-office (pandoc + wkhtmltopdf)
- 修复: 上传文件路径丢失, Agent 搜索浪费, 输出文件跑到 uploads/
- 打包: PyInstaller one-dir, 预打包 pandoc/wkhtmltopdf/chromium
This commit is contained in:
2026-09-13 23:41:04 +08:00
commit 6f402ffcee
638 changed files with 154534 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
// Automations management — the parts of Rohit's manual pass that automations.spec.ts (run-banner +
// Back) doesn't cover: the task list, triggering a manual run (POST .../run appends a run and opens
// its live session), pausing via the enable toggle, and deleting. Seeded with one task.
import { expect } from "@playwright/test";
import { test } from "./fixtures";
async function openAutomations(page) {
await page.goto("/");
await page.getByTestId("nav-automations").click();
await expect(page.getByText("Recurring tasks OpenWorker runs on a schedule.")).toBeVisible();
}
test("lists a scheduled task with its schedule and run count", async ({ page }) => {
await openAutomations(page);
const card = page.locator(".sched-card", { hasText: "Daily AI News" });
await expect(card).toBeVisible();
await expect(card).toContainText("Every day at ~5:40 PM");
await expect(card).toContainText("last running");
});
test("Run now triggers a manual run and opens its live session", async ({ page }) => {
await openAutomations(page);
await page.locator(".sched-card", { hasText: "Daily AI News" }).click();
await page.getByRole("button", { name: /Run now/ }).click();
// The manual run opens as a session with the automation-context banner.
const banner = page.getByTestId("run-banner");
await expect(banner).toBeVisible();
await expect(banner).toContainText("Daily AI News");
});
test("enable toggle pauses the task", async ({ page }) => {
await openAutomations(page);
await page.locator(".sched-card", { hasText: "Daily AI News" }).click();
await expect(page.getByText(/Active · next/)).toBeVisible();
// The checkbox is visually hidden behind a styled slider — click the label wrapper.
await page.locator("label.switch").click();
await expect(page.getByText("Paused", { exact: false })).toBeVisible();
});
test("delete removes the task; deleting the last one shows the empty state", async ({ page }) => {
await openAutomations(page);
await page.locator(".sched-card", { hasText: "Daily AI News" }).click();
await page.getByRole("button", { name: /Delete/ }).click();
// Back on the list, the deleted task is gone; the other seeded task remains.
await expect(page.locator(".sched-card", { hasText: "Daily AI News" })).toHaveCount(0);
await expect(page.locator(".sched-card", { hasText: "Weekly CRM digest" })).toHaveCount(1);
await page.locator(".sched-card", { hasText: "Weekly CRM digest" }).click();
await page.getByRole("button", { name: /Delete/ }).click();
await expect(page.getByText(/No scheduled tasks yet/)).toBeVisible();
});