diff --git a/src/components/radio/tests/radio.test.tsx b/src/components/radio/tests/radio.test.tsx index 40e8d99920..78046c9154 100644 --- a/src/components/radio/tests/radio.test.tsx +++ b/src/components/radio/tests/radio.test.tsx @@ -1,7 +1,6 @@ import React from 'react' import { fireEvent, render, testA11y, userEvent, screen } from 'testing' import Radio from '../' -import { RadioGroupProps } from '../group' const classPrefix = `adm-radio` @@ -22,7 +21,16 @@ describe('Radio', () => { expect(radio).toBeChecked() expect(label).toHaveClass(`${classPrefix}-checked`) }) + test('Radio click ', async () => { + const handleClick = jest.fn() + render(Radio) + const label = document.getElementsByTagName('label')[0] + expect(label).toHaveClass(`${classPrefix}`) + + fireEvent.click(label) + expect(handleClick).toBeCalledTimes(1) + }) test('onChange should be call once when the selected item is clicked multiple times', async () => { const onChange = jest.fn() render(