fix: toast message when copying server entry for a Streamable HTTP transport URL
This commit is contained in:
parent
ec84e21556
commit
d728d54614
2 changed files with 18 additions and 1 deletions
|
|
@ -175,7 +175,9 @@ const Sidebar = ({
|
||||||
description:
|
description:
|
||||||
transportType === "stdio"
|
transportType === "stdio"
|
||||||
? "Server configuration has been copied to clipboard. Add this to your mcp.json inside the 'mcpServers' object with your preferred server name."
|
? "Server configuration has been copied to clipboard. Add this to your mcp.json inside the 'mcpServers' object with your preferred server name."
|
||||||
: "SSE URL has been copied. Use this URL directly in your MCP Client.",
|
: transportType === "streamable-http"
|
||||||
|
? "Streamable HTTP URL has been copied. Use this URL directly in your MCP Client."
|
||||||
|
: "SSE URL has been copied. Use this URL directly in your MCP Client.",
|
||||||
});
|
});
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
|
||||||
|
|
@ -446,6 +446,11 @@ describe("Sidebar", () => {
|
||||||
4,
|
4,
|
||||||
);
|
);
|
||||||
expect(mockClipboardWrite).toHaveBeenCalledWith(expectedConfig);
|
expect(mockClipboardWrite).toHaveBeenCalledWith(expectedConfig);
|
||||||
|
expect(mockToast).toHaveBeenCalledWith({
|
||||||
|
title: "Config entry copied",
|
||||||
|
description:
|
||||||
|
"Server configuration has been copied to clipboard. Add this to your mcp.json inside the 'mcpServers' object with your preferred server name.",
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should copy servers file configuration to clipboard for STDIO transport", async () => {
|
it("should copy servers file configuration to clipboard for STDIO transport", async () => {
|
||||||
|
|
@ -504,6 +509,11 @@ describe("Sidebar", () => {
|
||||||
4,
|
4,
|
||||||
);
|
);
|
||||||
expect(mockClipboardWrite).toHaveBeenCalledWith(expectedConfig);
|
expect(mockClipboardWrite).toHaveBeenCalledWith(expectedConfig);
|
||||||
|
expect(mockToast).toHaveBeenCalledWith({
|
||||||
|
title: "Config entry copied",
|
||||||
|
description:
|
||||||
|
"SSE URL has been copied. Use this URL directly in your MCP Client.",
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should copy servers file configuration to clipboard for SSE transport", async () => {
|
it("should copy servers file configuration to clipboard for SSE transport", async () => {
|
||||||
|
|
@ -554,6 +564,11 @@ describe("Sidebar", () => {
|
||||||
4,
|
4,
|
||||||
);
|
);
|
||||||
expect(mockClipboardWrite).toHaveBeenCalledWith(expectedConfig);
|
expect(mockClipboardWrite).toHaveBeenCalledWith(expectedConfig);
|
||||||
|
expect(mockToast).toHaveBeenCalledWith({
|
||||||
|
title: "Config entry copied",
|
||||||
|
description:
|
||||||
|
"Streamable HTTP URL has been copied. Use this URL directly in your MCP Client.",
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should copy servers file configuration to clipboard for streamable-http transport", async () => {
|
it("should copy servers file configuration to clipboard for streamable-http transport", async () => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue