Skip to content

Commit 03264b5

Browse files
committed
fix failing test in RadioGroup
1 parent 813618f commit 03264b5

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

packages/react-components/src/components/RadioGroup/RadioGroup.test.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ describe("RadioGroup", () => {
2828
});
2929

3030
it("user can select a radio input option with a click", () => {
31-
const optionOne: HTMLFormElement = screen.getByTestId("one");
32-
expect(optionOne).not.toHaveAttribute("data-selected");
31+
const optionOne: HTMLInputElement = screen.getByRole("radio", {
32+
name: /option 1/i,
33+
});
34+
expect(optionOne).not.toBeChecked();
3335
fireEvent.click(optionOne);
34-
expect(optionOne).toHaveAttribute("data-selected");
36+
expect(optionOne).toBeChecked();
3537
});
3638
});

0 commit comments

Comments
 (0)