Use actual rendered element spinbutton in test

This commit is contained in:
Ola Hungerford
2025-04-01 06:50:23 -07:00
parent 180760c4db
commit b82c744583

View File

@@ -85,9 +85,7 @@ describe("ToolsTab", () => {
selectedTool: mockTools[1], // Use the tool with integer type
});
const input = screen.getByRole("textbox", {
name: /count/i,
}) as HTMLInputElement;
const input = screen.getByRole("spinbutton", { name: /count/i }) as HTMLInputElement;
expect(input).toHaveProperty("type", "number");
fireEvent.change(input, { target: { value: "42" } });
expect(input.value).toBe("42");