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:
Lucas Oliveira 2025-07-10 13:56:02 -03:00 • committed by GitHub
commit 87795931f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 380 additions and 140 deletions

View file

@ -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*"([^"]+)"/,