fix(mcp): remove Figma remote preset and open management (#6399)
* feat(mcp): configure OAuth client names in management * fix(mcp): use a short OAuth callback for Figma * fix(mcp): narrow catalog changes and remove Figma remote * test(mcp): drop unpublished Figma remote compatibility contract * fix(webui): align MCP catalog skeleton with card body
This commit is contained in:
1 parent
6a358a1e91
commit
06f3981962
11 files changed
+108
-52
No files matched your search
@@ -261,6 +261,28 @@ describe("MCP connection draft lifecycle", () => {
|
||||
}],
|
||||
};
|
||||
|
||||
it("opens management from an uninstalled MCP body without connecting or materializing it", async () => {
|
||||
vi.stubGlobal("fetch", vi.fn(async (input: RequestInfo | URL) => {
|
||||
const url = String(input);
|
||||
if (url === "/api/settings/mcp-presets") {
|
||||
return jsonResponse({ presets: [{ ...metabasePreset, installed: false, configured: false, available: false, status: "not_installed" }], installed_count: 0 });
|
||||
}
|
||||
if (url === "/api/settings") return jsonResponse(settingsPayload());
|
||||
return { ok: false, status: 404, text: async () => "Not found" } as Response;
|
||||
}));
|
||||
renderSettingsView({ initialSection: "apps" });
|
||||
fireEvent.click(await screen.findByRole("button", { name: "MCP" }));
|
||||
fireEvent.click(await screen.findByRole("button", { name: "Metabase" }));
|
||||
const dialog = await screen.findByRole("dialog", { name: "Metabase" });
|
||||
expect(within(dialog).getByRole("tab", { name: "Overview" })).toHaveAttribute("aria-selected", "true");
|
||||
expect(requestMutationMock).not.toHaveBeenCalled();
|
||||
fireEvent.click(within(dialog).getByRole("button", { name: "Close" }));
|
||||
fireEvent.click(screen.getByRole("button", { name: "Connect Metabase" }));
|
||||
const connection = await screen.findByRole("dialog", { name: "Metabase" });
|
||||
expect(within(connection).getByRole("tab", { name: "Connection" })).toHaveAttribute("aria-selected", "true");
|
||||
expect(requestMutationMock).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("reopens and reconnects without proxy after OAuth with proxy and a same-endpoint import", async () => {
|
||||
const endpoint = "https://app.xmind.com/api/mcp";
|
||||
let preset: McpPresetInfo = {
|
||||
|
||||
@@ -281,7 +281,7 @@ describe("SettingsView Apps catalog", () => {
|
||||
expect(row).not.toBeNull();
|
||||
expect(row?.parentElement).toHaveClass("xl:grid-cols-2");
|
||||
const failed = within(row as HTMLElement).getByText("Connection failed.");
|
||||
expect(failed.closest("button")).toBeNull();
|
||||
expect(failed.closest("button")).toHaveAccessibleName("Xmind");
|
||||
expect(failed.closest("p")?.querySelector(".lucide-triangle-alert")).not.toBeNull();
|
||||
expect(row?.querySelector(".lucide-check")).toBeNull();
|
||||
expect(within(row as HTMLElement).getByRole("button", { name: "Manage Xmind" })).toHaveTextContent(
|
||||
|
||||
Reference in new issue
Block a user