fix: improved better health check and stream URL check on MCP, improved JSON recognition (#8982)
* Improved health check and stream URL check on MCP * Improved health check by validating session connectivity * Changed mcp servers from json checks * Fixed imports * Fixed mcp server tab test
This commit is contained in:
parent
a9a5c3490c
commit
87795931f0
3 changed files with 380 additions and 140 deletions
|
|
@ -165,7 +165,9 @@ test(
|
|||
await expect(page.getByTestId("icon-check")).toBeVisible();
|
||||
|
||||
// Get the SSE URL from the configuration
|
||||
const configJson = await page.locator("pre").textContent();
|
||||
const configJson = await page.evaluate(() => {
|
||||
return navigator.clipboard.readText();
|
||||
});
|
||||
expect(configJson).toContain("mcpServers");
|
||||
expect(configJson).toContain("mcp-proxy");
|
||||
expect(configJson).toContain("uvx");
|
||||
|
|
@ -180,8 +182,13 @@ test(
|
|||
await page.getByText("macOS/Linux", { exact: true }).click();
|
||||
|
||||
await page.waitForSelector("pre", { state: "visible", timeout: 3000 });
|
||||
// Copy configuration
|
||||
await page.getByTestId("icon-copy").click();
|
||||
await expect(page.getByTestId("icon-check")).toBeVisible();
|
||||
|
||||
const configJsonLinux = await page.locator("pre").textContent();
|
||||
const configJsonLinux = await page.evaluate(() => {
|
||||
return navigator.clipboard.readText();
|
||||
});
|
||||
|
||||
const sseUrlMatchLinux = configJsonLinux?.match(
|
||||
/"args":\s*\[\s*"mcp-proxy"\s*,\s*"([^"]+)"/,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue