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:
62
surfaces/gui/e2e/gcal-page.spec.ts
Normal file
62
surfaces/gui/e2e/gcal-page.spec.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
// The Google Calendar detail page: gmail-parity multi-account (Default badge,
|
||||
// Make default, per-account disconnect, direct one-click add — no modal).
|
||||
import { expect } from "@playwright/test";
|
||||
import { test } from "./fixtures";
|
||||
|
||||
async function openConnectors(page) {
|
||||
await page.goto("/");
|
||||
await page.getByTestId("account-row").click();
|
||||
await page.getByRole("button", { name: "Connectors", exact: true }).click();
|
||||
}
|
||||
|
||||
async function signInAndConnectFirstAccount(page) {
|
||||
await openConnectors(page);
|
||||
await page.getByTestId("account-row").click();
|
||||
await page.getByTestId("account-sign-in").click();
|
||||
await expect(page.getByTestId("account-row")).toContainText("Rohit", { timeout: 10_000 });
|
||||
// starts disconnected → Available row → one click (mock connects instantly)
|
||||
await page
|
||||
.getByTestId("connector-google_calendar")
|
||||
.getByRole("button", { name: "Connect", exact: true })
|
||||
.click();
|
||||
await page.getByRole("button", { name: /Connect Google Calendar with one click/i }).click();
|
||||
await page.keyboard.press("Escape");
|
||||
await expect(page.getByTestId("connector-google_calendar")).toContainText("rohit@gmail.com", {
|
||||
timeout: 10_000,
|
||||
});
|
||||
}
|
||||
|
||||
test("connect, then add a second account from the page; first stays default", async ({
|
||||
page,
|
||||
}) => {
|
||||
await signInAndConnectFirstAccount(page);
|
||||
await page.getByTestId("connector-google_calendar").click();
|
||||
await expect(page.getByTestId("gcal-detail")).toBeVisible();
|
||||
|
||||
await page.getByTestId("add-account-btn").click();
|
||||
const rohit = page.getByTestId("gcal-account-rohit@gmail.com");
|
||||
const work = page.getByTestId("gcal-account-work@dlai.com");
|
||||
await expect(work).toBeVisible({ timeout: 10_000 });
|
||||
await expect(rohit).toContainText("Default");
|
||||
await expect(work).not.toContainText("Default");
|
||||
// list row summarizes the multi-account state
|
||||
await page.getByTestId("connectors-breadcrumb").click();
|
||||
await expect(page.getByTestId("connector-google_calendar")).toContainText("2 accounts");
|
||||
});
|
||||
|
||||
test("Make default moves the badge; disconnecting the default repoints it", async ({
|
||||
page,
|
||||
}) => {
|
||||
await signInAndConnectFirstAccount(page);
|
||||
await page.getByTestId("connector-google_calendar").click();
|
||||
await page.getByTestId("add-account-btn").click();
|
||||
await expect(page.getByTestId("gcal-account-work@dlai.com")).toBeVisible({ timeout: 10_000 });
|
||||
|
||||
await page.getByTestId("gcal-make-default-work@dlai.com").click();
|
||||
await expect(page.getByTestId("gcal-account-work@dlai.com")).toContainText("Default");
|
||||
await expect(page.getByTestId("gcal-account-rohit@gmail.com")).not.toContainText("Default");
|
||||
|
||||
await page.getByTestId("gcal-disconnect-work@dlai.com").click();
|
||||
await expect(page.getByTestId("gcal-account-work@dlai.com")).toHaveCount(0);
|
||||
await expect(page.getByTestId("gcal-account-rohit@gmail.com")).toContainText("Default");
|
||||
});
|
||||
Reference in New Issue
Block a user