import React from 'react'; import 'jest-styled-components'; import { render } from '@testing-library/react'; import { Grommet } from '../../Grommet'; import { FileInput } from '..'; describe('FileInput', () => { test('basic', () => { const { container } = render( , ); expect(container.firstChild).toMatchSnapshot(); }); test('multiple', () => { const { container } = render( , ); expect(container.firstChild).toMatchSnapshot(); }); test('multiple aggregateThreshold', () => { const { container } = render( , ); expect(container.firstChild).toMatchSnapshot(); }); test('accept', () => { const { container } = render( , ); expect(container.firstChild).toMatchSnapshot(); }); test('disabled', () => { const { container } = render( , ); expect(container.firstChild).toMatchSnapshot(); }); test('messages', () => { const { container } = render( , ); expect(container.firstChild).toMatchSnapshot(); }); test('background', () => { const customTheme = { fileInput: { background: { color: 'background-contrast', }, }, }; const { container } = render( , ); expect(container.firstChild).toMatchSnapshot(); }); test('border', () => { const customTheme = { fileInput: { border: { color: 'brand', size: 'large', }, }, }; const { container } = render( , ); expect(container.firstChild).toMatchSnapshot(); }); test('pad', () => { const customTheme = { fileInput: { pad: 'small', }, }; const { container } = render( , ); expect(container.firstChild).toMatchSnapshot(); }); test('margin', () => { const customTheme = { fileInput: { margin: 'small', }, }; const { container } = render( , ); expect(container.firstChild).toMatchSnapshot(); }); test('custom theme input font size', () => { const { container } = render( , ); expect(container.firstChild).toMatchSnapshot(); }); test('maxSize', () => { const maxSize = 5000000; const { container } = render( , ); expect(container.firstChild).toMatchSnapshot(); }); test('multiple max', () => { const { container } = render( , ); expect(container.firstChild).toMatchSnapshot(); }); });