Skip to content

Commit 3a9fd2d

Browse files
committed
test(Checkbox): assert tab navigation in disabled-not-focusable spec
The "disabled checkbox is not focusable via Tab" test had a misleading name — it only checked `toBeDisabled()` without exercising Tab. Add the Tab keypress and assert the checkbox does not receive focus so the test matches its stated behavior.
1 parent 579a817 commit 3a9fd2d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/forms/checkbox.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,9 @@ describe('Checkbox Visual Regression', () => {
426426
});
427427
const checkbox = page.getByRole('checkbox');
428428
await expect(checkbox).toBeDisabled();
429+
await page.locator('body').click();
430+
await page.keyboard.press('Tab');
431+
await expect(checkbox).not.toBeFocused();
429432
});
430433
});
431434
});

0 commit comments

Comments
 (0)