Fix failing tests
CI Pipeline / test (20) (pull_request) Successful in 2m30s
CI Pipeline / test (18) (pull_request) Successful in 3m51s
CI Pipeline / e2e (firefox) (pull_request) Successful in 3m22s
CI Pipeline / e2e (webkit) (pull_request) Successful in 3m45s
CI Pipeline / e2e (chromium) (pull_request) Successful in 11m49s
CI Pipeline / visual-regression (pull_request) Successful in 6m48s
CI Pipeline / storybook (pull_request) Successful in 1m35s
CI Pipeline / lint (pull_request) Successful in 1m12s
CI Pipeline / build (pull_request) Successful in 1m54s
CI Pipeline / performance (pull_request) Successful in 4m6s

This commit is contained in:
adilallo
2025-10-14 20:47:34 -06:00
parent c4a631a5d8
commit fa5a190416
20 changed files with 4638 additions and 1242 deletions
@@ -13,9 +13,10 @@ export const DefaultInteraction = {
await userEvent.click(radioButton);
await expect(radioButton).toHaveAttribute("aria-checked", "true");
// Click to uncheck
// Radio buttons can't be unchecked by clicking them again
// They stay checked until another radio button in the same group is selected
await userEvent.click(radioButton);
await expect(radioButton).toHaveAttribute("aria-checked", "false");
await expect(radioButton).toHaveAttribute("aria-checked", "true");
},
};
@@ -27,11 +28,8 @@ export const CheckedInteraction = {
// Should be checked initially
await expect(radioButton).toHaveAttribute("aria-checked", "true");
// Click to uncheck
await userEvent.click(radioButton);
await expect(radioButton).toHaveAttribute("aria-checked", "false");
// Click to check again
// Radio buttons can't be unchecked by clicking them again
// They stay checked until another radio button in the same group is selected
await userEvent.click(radioButton);
await expect(radioButton).toHaveAttribute("aria-checked", "true");
},
@@ -71,18 +71,18 @@ export const InteractiveInteraction = {
const radioButtons = canvas.getAllByRole("radio");
// Should have radiogroup role
expect(radioGroup).toBeInTheDocument();
await expect(radioGroup).toBeInTheDocument();
// Should show initial state
expect(canvas.getByText("Selected: option1")).toBeVisible();
await expect(canvas.getByText("Selected: option1")).toBeVisible();
// Click second option
userEvent.click(radioButtons[1]);
expect(canvas.getByText("Selected: option2")).toBeVisible();
await userEvent.click(radioButtons[1]);
await expect(canvas.getByText("Selected: option2")).toBeVisible();
// Click third option
userEvent.click(radioButtons[2]);
expect(canvas.getByText("Selected: option3")).toBeVisible();
await userEvent.click(radioButtons[2]);
await expect(canvas.getByText("Selected: option3")).toBeVisible();
},
};