diff --git a/clients/web/src/components/groups/ToolControls/ToolControls.stories.tsx b/clients/web/src/components/groups/ToolControls/ToolControls.stories.tsx index 0dea7f16..4bc75f7d 100644 --- a/clients/web/src/components/groups/ToolControls/ToolControls.stories.tsx +++ b/clients/web/src/components/groups/ToolControls/ToolControls.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/react-vite"; -import { fn } from "storybook/test"; +import { fn, userEvent, within } from "storybook/test"; import { ToolControls } from "./ToolControls"; import { longToolList } from "../../screens/ToolsScreen/ToolsScreen.fixtures"; @@ -33,6 +33,13 @@ export const WithSearch: Story = { args: { tools: longToolList, }, + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + await userEvent.type( + await canvas.findByPlaceholderText("Search tools..."), + "git", + ); + }, }; export const ListChanged: Story = { diff --git a/clients/web/src/components/screens/ResourcesScreen/ResourcesScreen.stories.tsx b/clients/web/src/components/screens/ResourcesScreen/ResourcesScreen.stories.tsx index 4867920d..b8d21e08 100644 --- a/clients/web/src/components/screens/ResourcesScreen/ResourcesScreen.stories.tsx +++ b/clients/web/src/components/screens/ResourcesScreen/ResourcesScreen.stories.tsx @@ -127,6 +127,9 @@ async function clickByText(canvasElement: HTMLElement, label: string) { await userEvent.click(await canvas.findByText(label)); } +// The userId value typed below must match the `{userId}` segment in +// `readUserProfileState.uri` so the synthetic-resource fallback in +// ResourcesScreen matches and the preview panel renders. async function expandUserProfileTemplate(canvasElement: HTMLElement) { const canvas = within(canvasElement); await userEvent.click(await canvas.findByText("User Profile")); diff --git a/clients/web/src/components/screens/ToolsScreen/ToolsScreen.fixtures.ts b/clients/web/src/components/screens/ToolsScreen/ToolsScreen.fixtures.ts index 85e90106..4da11f54 100644 --- a/clients/web/src/components/screens/ToolsScreen/ToolsScreen.fixtures.ts +++ b/clients/web/src/components/screens/ToolsScreen/ToolsScreen.fixtures.ts @@ -103,7 +103,7 @@ export const longToolList: Tool[] = [ params: { type: "array", description: "Positional bind parameters", - items: {}, + items: { type: "string" }, }, limit: { type: "number" }, }, @@ -269,7 +269,7 @@ export const longToolList: Tool[] = [ type: "object", properties: { url: { type: "string" }, - body: {}, + body: { type: "object", description: "JSON request body" }, headers: { type: "object" }, }, required: ["url", "body"],