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
This commit is contained in:
51
surfaces/gui/e2e/nav-collapse.spec.ts
Normal file
51
surfaces/gui/e2e/nav-collapse.spec.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
// Left-nav polish (§20): collapse (⌘B / brand button → reveal button docks it back) and the
|
||||
// RECENT-header group/filter popover (Group by Persona↔Chronological, Filter by coworker).
|
||||
import { expect } from "@playwright/test";
|
||||
import { test } from "./fixtures";
|
||||
|
||||
test("collapse hides the sidebar and reclaims the width; reveal button docks it back", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/");
|
||||
const app = page.locator(".app");
|
||||
await expect(page.locator(".sidebar")).toBeVisible();
|
||||
|
||||
// Collapse via the brand button.
|
||||
await page.getByRole("button", { name: "Collapse sidebar" }).click();
|
||||
await expect(app).toHaveClass(/nav-collapsed/);
|
||||
// The floating reveal affordance appears; clicking it docks the nav back.
|
||||
const reveal = page.getByRole("button", { name: "Show sidebar" });
|
||||
await expect(reveal).toBeVisible();
|
||||
await reveal.click();
|
||||
await expect(app).not.toHaveClass(/nav-collapsed/);
|
||||
});
|
||||
|
||||
test("⌘B toggles the sidebar collapse", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
const app = page.locator(".app");
|
||||
await page.keyboard.press("Meta+b");
|
||||
await expect(app).toHaveClass(/nav-collapsed/);
|
||||
await page.keyboard.press("Meta+b");
|
||||
await expect(app).not.toHaveClass(/nav-collapsed/);
|
||||
});
|
||||
|
||||
test("RECENT header group/filter popover: switch grouping + see coworker filters", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/");
|
||||
const header = page.getByTestId("recent-header");
|
||||
await expect(header).toContainText("Recent");
|
||||
|
||||
await header.getByRole("button", { name: "Group and filter conversations" }).click();
|
||||
const menu = page.getByTestId("group-filter-menu");
|
||||
await expect(menu).toContainText("Group by");
|
||||
await expect(menu).toContainText("Filter by coworker");
|
||||
|
||||
// Switch to Chronological → the persona accordion collapses into a flat list (the "OpenWorker"
|
||||
// persona group header is no longer a row; sessions list directly).
|
||||
await menu.getByText("Chronological").click();
|
||||
await expect(menu.getByText("Chronological").locator("xpath=..")).toContainText("✓");
|
||||
|
||||
// Filter-by-coworker checkboxes are present (none checked by default → all shown).
|
||||
await expect(menu).toContainText("None checked shows all.");
|
||||
});
|
||||
Reference in New Issue
Block a user