Skip to content

Commit 6817d51

Browse files
committed
test: add test case
1 parent 913982b commit 6817d51

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/index.test.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,4 +753,16 @@ describe('Segmented keyboard navigation', () => {
753753
await user.keyboard('{ArrowLeft}');
754754
expect(onChange).toHaveBeenCalledWith('iOS');
755755
});
756+
757+
it('should not have focus style when clicking', async () => {
758+
const user = userEvent.setup();
759+
const { container } = render(
760+
<Segmented options={['iOS', 'Android', 'Web']} />,
761+
);
762+
763+
await user.click(container.querySelector('.rc-segmented-item-input')!);
764+
expect(container.querySelector('.rc-segmented-item-input')).not.toHaveClass(
765+
'rc-segmented-item-input-focused',
766+
);
767+
});
756768
});

0 commit comments

Comments
 (0)