import {mountWithTheme} from 'sentry-test/enzyme';
import RadioGroup from 'app/views/settings/components/forms/controls/radioGroup';
describe('RadioGroup', function () {
it('renders', function () {
const mock = jest.fn();
const wrapper = mountWithTheme(
);
expect(wrapper).toSnapshot();
});
it('renders disabled', function () {
const mock = jest.fn();
const wrapper = mountWithTheme(
);
expect(wrapper).toSnapshot();
expect(wrapper.find('RadioLineText').props().disabled).toBe(true);
expect(wrapper.find('Radio').props().disabled).toBe(true);
});
it('can select a different item', function () {
const mock = jest.fn();
const wrapper = mountWithTheme(
);
expect(wrapper).toSnapshot();
});
it('calls onChange when clicked', function () {
const mock = jest.fn();
const wrapper = mountWithTheme(
);
wrapper.find('[role="radio"] Radio').last().simulate('change');
expect(mock).toHaveBeenCalledWith(expect.any(String), expect.any(Object));
});
});