feat: 增加 MCP 研究模板保存工具

This commit is contained in:
yuxuanhui
2026-09-11 23:05:01 +08:00
parent 03a66546f3
commit f29063c9a2
13 changed files with 430 additions and 13 deletions
+9
View File
@@ -57,4 +57,13 @@ test("MCP Key menu creates, hides secrets on navigation, and revokes", async ({
page.getByRole("heading", { name: "MCP Key", exact: true }),
).toBeVisible();
await expect(page.getByLabel("新 Key 明文")).toHaveCount(0);
await page.getByLabel("Key 名称").fill("Browser test template writer");
await page.getByRole("checkbox", { name: /保存研究模板/ }).check();
await page.getByRole("button", { name: "创建 Key", exact: true }).click();
await expect(page.getByLabel("新 Key 明文")).toBeVisible();
const writers = await (await page.request.get("/api/v1/mcp-tokens")).json();
const writer = writers.items.find(
(item: { name: string }) => item.name === "Browser test template writer",
);
expect(writer.scopes).toEqual(["research:read", "research:write"]);
});