import {render} from 'sentry-test/reactTestingLibrary'; import {MultipleCheckboxField} from 'sentry/components/deprecatedforms'; import Form from 'sentry/components/forms/form'; import FormModel from 'sentry/components/forms/model'; describe('MultipleCheckboxField', function () { it('renders without form context', function () { const {container} = render( ); expect(container).toSnapshot(); }); it('renders with form context', function () { const model = new FormModel({initialData: {fieldName: ['1']}}); const {container} = render(
); expect(container).toSnapshot(); expect(model.fields.get('fieldName')).toEqual(['1']); }); });