import React from 'react'; import { create } from 'react-test-renderer'; import { InputPatternFormat } from '..'; import { IconEye } from '../../icons/eye'; test('Default', () => { const tree = create( ); expect(tree.toJSON()).toMatchSnapshot(); }); test('With ID', () => { const tree = create( ); expect(tree.toJSON()).toMatchSnapshot(); }); test('Required', () => { const tree = create( ); expect(tree.toJSON()).toMatchSnapshot(); }); test('Label', () => { const tree = create( ); expect(tree.toJSON()).toMatchSnapshot(); }); test('Error & Message string', () => { const tree = create( ); expect(tree.toJSON()).toMatchSnapshot(); }); test('Error & Message ReactNode', () => { const tree = create( Custom error )} /> ); expect(tree.toJSON()).toMatchSnapshot(); }); test('Description string', () => { const tree = create( ); expect(tree.toJSON()).toMatchSnapshot(); }); test('Description ReactNode', () => { const tree = create( Description ReactNode )} /> ); expect(tree.toJSON()).toMatchSnapshot(); }); test('elBefore & elAfter', () => { const tree = create( } elAfter={} /> ); expect(tree.toJSON()).toMatchSnapshot(); }); test('elBefore', () => { const tree = create( } /> ); expect(tree.toJSON()).toMatchSnapshot(); }); test('elAfter', () => { const tree = create( } /> ); expect(tree.toJSON()).toMatchSnapshot(); }); test('disabled', () => { const tree = create( ); expect(tree.toJSON()).toMatchSnapshot(); }); test('disabled & readOnly', () => { const tree = create( ); expect(tree.toJSON()).toMatchSnapshot(); }); test('readOnly', () => { const tree = create( ); expect(tree.toJSON()).toMatchSnapshot(); });