import * as React from 'react'; import render from '../../_utils/tests/render'; import TextareaField from '../TextareaField'; it('renders correctly for a basic input field', () => { const { container } = render(); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly for an input field with a placeholder', () => { const { container } = render(); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly for a disabled input field', () => { const { container } = render(); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly for an input field with a default value', () => { const { container } = render(); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly for a full width input field', () => { const { container } = render(); expect(container.firstChild).toMatchSnapshot(); }); describe('sizes', () => { ['small', 'medium', 'large'].forEach(size => { it(`renders correctly for an input field with size ${size}`, () => { const { container } = render(); expect(container.firstChild).toMatchSnapshot(); }); }); }); describe('states', () => { ['danger', 'success', 'warning', 'primary'].forEach(state => { it(`renders correctly for an input field with state ${state}`, () => { const { container } = render(); expect(container.firstChild).toMatchSnapshot(); }); }); }); it('renders correctly for an input field with a description', () => { const { container } = render( ); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly for an input field with a hint', () => { const { container } = render(); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly for an optional input field', () => { const { container } = render(); expect(container.firstChild).toMatchSnapshot(); }); it('renders correctly for a required field', () => { const { container } = render(); expect(container.firstChild).toMatchSnapshot(); });