From 46bf00e06b956a6862918c8faf73a54dac511430 Mon Sep 17 00:00:00 2001 From: Oleg Isonen Date: Fri, 13 Nov 2026 17:06:42 +0000 Subject: [PATCH] test: cover publish wait in CLI schema checks --- packages/cli/src/commands/schema.test.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/commands/schema.test.ts b/packages/cli/src/commands/schema.test.ts index 412fc0ec6f..473189956d 100644 --- a/packages/cli/src/commands/schema.test.ts +++ b/packages/cli/src/commands/schema.test.ts @@ -105,7 +105,10 @@ test("prints api command schema as json", () => { }), expect.objectContaining({ useCase: "Publish project", - commands: ["webstudio publish deploy --target production --json"], + commands: [ + "webstudio publish deploy --target production --json", + "webstudio publish deploy --target production --json --wait", + ], }), ]) ); @@ -155,8 +158,17 @@ test("prints compact mcp tool summaries as json by default", () => { inputSchema, }) ); - // Includes Form simulation, custom response headers, screenshot, and all three style source transfer schemas. - expect(JSON.stringify(handshakePayload).length).toBeLessThan(224_500); + // Publish validation and execution occupy about 1.5k characters; keep the old + // budget for all other tools and a tight overall handshake budget. + expect(JSON.stringify(handshakePayload).length).toBeLessThan(226_000); + expect( + JSON.stringify( + handshakePayload.filter( + ({ name }) => + name !== "validate-publish" && name !== "get-publish-report" + ) + ).length + ).toBeLessThan(224_500); const screenshotTool = expectedTools.find( ({ name }) => name === "screenshot" );