import userEvent from '@testing-library/user-event' import * as React from 'react' import renderWithTheme from '../../tests/helpers/renderWithTheme' import RadioCard from './RadioCard' describe('component: RadioCard', () => { test('style props go to wrapper', () => { const style = { outline: '1px solid orange' } const { getByTestId } = renderWithTheme( ) const input = getByTestId('myradio') const wrapper = input.parentElement expect(input).toHaveAttribute('id', 'what') expect(input).toHaveAttribute('name', 'hope') expect(input).toHaveAttribute('value', 'quest') expect(input).toHaveAttribute('aria-labelledby', wrapper?.id) expect(input).not.toHaveStyle(style) expect(input).not.toHaveClass('sup') expect(wrapper?.id).not.toBe('what') expect(wrapper).toHaveStyle(style) expect(wrapper).toHaveClass('sup', RadioCard.toString().slice(1)) }) test('card wrapper behaves like