Update test to fail more explicitly

This commit is contained in:
Ola Hungerford
2025-03-31 08:04:53 -07:00
parent 7ac1e40c9d
commit 7753b275e5

View File

@@ -85,15 +85,11 @@ describe("ToolsTab", () => {
selectedTool: mockTools[1], // Use the tool with integer type
});
// Verify input is rendered as a number input
const input = screen.getByRole("spinbutton") as HTMLInputElement;
expect(input.type).toBe("number"); // Integer type should be treated as number
// Enter an integer value
const input = screen.getByRole("textbox", { name: /count/i }) as HTMLInputElement;
expect(input).toHaveProperty("type", "number");
fireEvent.change(input, { target: { value: "42" } });
expect(input.value).toBe("42");
// Verify the callTool function receives the value as a number
const submitButton = screen.getByRole("button", { name: /run tool/i });
fireEvent.click(submitButton);