v2.7.0: 顶栏新增文档入口,/docs 页提供 MCP 与 Console API(/api/v1)说明(认证、MCP 客户端配置与工具清单、REST 端点与 curl 示例)

This commit is contained in:
bigcode
2026-10-01 02:33:08 +08:00
parent c4b5e65159
commit fa0730c6dd
6 changed files with 216 additions and 1 deletions
+25
View File
@@ -278,6 +278,31 @@ check("勾选后工具条出现「保留选中(批量保留)」按钮", true);
await page.waitForTimeout(400);
await page.screenshot({ path: `${SHOT_DIR}/16-inbox-retain.png` });
// 7. 文档页:顶栏文档图标进入 /docs,含 MCP 与 REST API 说明
await page.goto(`${BASE}/inboxs`, { waitUntil: "domcontentloaded" });
await page.waitForSelector(".ant-table-tbody", { timeout: 8000 });
check("顶栏文档图标存在(主题切换左侧)", (await page.locator("button[aria-label='打开文档']").count()) === 1);
await page.click("button[aria-label='打开文档']");
await page.waitForURL(`${BASE}/docs`, { timeout: 8000 });
await page.waitForSelector(".ant-card:has-text('MCP 接入')", { timeout: 8000 });
const headerTitle = (await page.locator(".app-header .title").textContent()) ?? "";
const docsText = (await page.locator(".app-content").innerText()) ?? "";
check(
"文档页内容完整(认证 / MCP 接入 / REST API / mcp 端点)",
headerTitle.trim() === "文档" &&
docsText.includes("认证") &&
docsText.includes("MCP 接入") &&
docsText.includes("REST API") &&
docsText.includes("/api/v1/mcp") &&
docsText.includes("Authorization: Bearer wmh_"),
);
check(
"文档页两张清单表(5 个 MCP 工具 + 7 个 API 端点)",
(await page.locator(".ant-table-tbody tr").count()) >= 12,
);
await page.waitForTimeout(500);
await page.screenshot({ path: `${SHOT_DIR}/17-docs.png` });
await browser.close();
const failed = results.filter((r) => !r.ok);