+12
-10
@@ -33,7 +33,13 @@ async function host(
|
||||
options: Plugin.Context["options"] = { provider: "test" },
|
||||
configuredMcp: Record<
|
||||
string,
|
||||
{ type: "local"; command: string[]; codemode?: boolean; disabled?: boolean }
|
||||
{
|
||||
type: "local";
|
||||
command: string[];
|
||||
codemode?: boolean;
|
||||
disabled?: boolean;
|
||||
timeout?: { startup?: number; catalog?: number; execution?: number };
|
||||
}
|
||||
> = {},
|
||||
configuredMcpTools: string[] = [],
|
||||
directory = "/test",
|
||||
@@ -440,6 +446,7 @@ test("playwright MCP prefers direct MCP, uses npx for Playwright, and preserves
|
||||
expect(local.mcpServers.get("playwright")).toEqual({
|
||||
type: "local",
|
||||
command: [executable],
|
||||
timeout: { startup: 300_000 },
|
||||
});
|
||||
|
||||
const globalPackage = join(root, "global", "@playwright", "mcp");
|
||||
@@ -530,15 +537,8 @@ test("playwright MCP prefers direct MCP, uses npx for Playwright, and preserves
|
||||
const fallback = await host();
|
||||
expect(fallback.mcpServers.get("playwright")).toEqual({
|
||||
type: "local",
|
||||
command: [
|
||||
"docker",
|
||||
"run",
|
||||
"-i",
|
||||
"--rm",
|
||||
"--init",
|
||||
"--pull=always",
|
||||
"mcr.microsoft.com/playwright/mcp",
|
||||
],
|
||||
command: ["docker", "run", "-i", "--rm", "--init", "mcr.microsoft.com/playwright/mcp"],
|
||||
timeout: { startup: 300_000 },
|
||||
});
|
||||
|
||||
const existing = await host(
|
||||
@@ -549,6 +549,7 @@ test("playwright MCP prefers direct MCP, uses npx for Playwright, and preserves
|
||||
type: "local",
|
||||
command: ["custom-playwright-mcp"],
|
||||
disabled: true,
|
||||
timeout: { startup: 12_345 },
|
||||
},
|
||||
docs: { type: "local", command: ["docs"], codemode: true },
|
||||
},
|
||||
@@ -557,6 +558,7 @@ test("playwright MCP prefers direct MCP, uses npx for Playwright, and preserves
|
||||
type: "local",
|
||||
command: ["custom-playwright-mcp"],
|
||||
disabled: true,
|
||||
timeout: { startup: 12_345 },
|
||||
});
|
||||
expect(existing.mcpServers.get("docs")?.codemode).toBe(true);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user