import * as React from 'react'; import render from '../../_utils/tests/render'; import FieldWrapper from '../FieldWrapper'; // @ts-ignore import Input from '../../Input'; it('renders correctly for a basic field', () => { const { container } = render( ); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly for a field with a description', () => { const { container } = render( ); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly for a field with a hint', () => { const { container } = render( ); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly for an optional field', () => { const { container } = render( ); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly for a required field', () => { const { container } = render( ); expect(container.firstChild).toMatchSnapshot(); }); describe('states', () => { ['danger', 'success', 'warning', 'primary'].forEach(state => { it(`renders correctly for an input with state ${state}`, () => { const { container } = render( ); expect(container.firstChild).toMatchSnapshot(); }); }); });