Files
OpenMesh/surfaces/gui/e2e/cloud-signin-placement.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

44 lines
1.8 KiB
TypeScript

// Regression guard (shipped once, 2026-07-09; reshaped by §26): cloud sign-in must be
// reachable by a FRESH user. The sidebar account row is the permanent sign-in home —
// always visible, never below any fold — and every signed-out one-click pane carries a
// real Sign-in button, not a hint pointing at another page.
import { expect } from "@playwright/test";
import { test } from "./fixtures";
async function openConnectors(page) {
await page.goto("/");
await page.getByTestId("account-row").click();
await page.getByTestId("account-menu").getByRole("button", { name: "Connectors", exact: true }).click();
}
test("the account row is always visible and signs in from its menu", async ({ page }) => {
await page.goto("/");
const row = page.getByTestId("account-row");
await expect(row).toBeVisible();
await expect(row).toContainText("Not signed in");
await row.click();
await page.getByTestId("account-sign-in").click();
await expect(row).toContainText("Rohit", { timeout: 10_000 });
// Sign out is right there in the same menu once signed in.
await row.click();
await expect(
page.getByTestId("account-menu").getByRole("button", { name: "Sign out" }),
).toBeVisible();
});
test("signed-out one-click pane signs in inline, then connects", async ({ page }) => {
await openConnectors(page);
// Fresh user path: Available → Connect → the pane must offer sign-in itself.
await page
.getByTestId("connector-gmail")
.getByRole("button", { name: "Connect", exact: true })
.click();
await page.getByTestId("inline-cloud-sign-in").click();
// The mock signs in instantly; the section's poll re-renders the pane armed.
await expect(
page.getByRole("button", { name: /Connect Gmail with one click/i }),
).toBeVisible({ timeout: 10_000 });
});