Update test to fail more explicitly
This commit is contained in:
@@ -85,15 +85,11 @@ describe("ToolsTab", () => {
|
|||||||
selectedTool: mockTools[1], // Use the tool with integer type
|
selectedTool: mockTools[1], // Use the tool with integer type
|
||||||
});
|
});
|
||||||
|
|
||||||
// Verify input is rendered as a number input
|
const input = screen.getByRole("textbox", { name: /count/i }) as HTMLInputElement;
|
||||||
const input = screen.getByRole("spinbutton") as HTMLInputElement;
|
expect(input).toHaveProperty("type", "number");
|
||||||
expect(input.type).toBe("number"); // Integer type should be treated as number
|
|
||||||
|
|
||||||
// Enter an integer value
|
|
||||||
fireEvent.change(input, { target: { value: "42" } });
|
fireEvent.change(input, { target: { value: "42" } });
|
||||||
expect(input.value).toBe("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 });
|
const submitButton = screen.getByRole("button", { name: /run tool/i });
|
||||||
fireEvent.click(submitButton);
|
fireEvent.click(submitButton);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user