Skip to content

Commit 6f690ed

Browse files
committed
test: assert aria-readonly on a read-only switch
The read-only test covered focusability and checked state but never the attribute the read-only contract exists for on web, so dropping it left the test green.
1 parent d695b66 commit 6f690ed

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/components/__tests__/Switch.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ describe('Switch operability', () => {
173173
const control = screen.getByRole('switch');
174174

175175
expect(control).toHaveProp('focusable', false);
176+
expect(control).toHaveProp('aria-readonly', true);
176177
expect(control).toBeChecked();
177178
expect(control).toBeEnabled();
178179
});

0 commit comments

Comments
 (0)