diff --git a/src/components/SimpleDateForm/SimpleDateForm.js b/src/components/SimpleDateForm/SimpleDateForm.js new file mode 100644 index 0000000..261995c --- /dev/null +++ b/src/components/SimpleDateForm/SimpleDateForm.js @@ -0,0 +1,34 @@ +import React from 'react'; +import { Form, Field } from 'react-final-form'; +import { Button, Datepicker } from '@folio/stripes/components'; +import { requiredValidator } from '@folio/stripes-erm-components'; + +const SimpleDateForm = () => { + return ( +
+ )} + /> + ); +}; + +export default SimpleDateForm; diff --git a/src/components/SimpleDateForm/SimpleDateForm.test.js b/src/components/SimpleDateForm/SimpleDateForm.test.js new file mode 100644 index 0000000..7155117 --- /dev/null +++ b/src/components/SimpleDateForm/SimpleDateForm.test.js @@ -0,0 +1,23 @@ +import React from 'react'; +import { renderWithIntl, Datepicker, Button } from '@folio/stripes-erm-testing'; +import { waitFor, screen } from '@folio/jest-config-stripes/testing-library/react'; +import SimpleDateForm from './SimpleDateForm'; + +describe('SimpleDateForm', () => { + test('Button should be enabled when date is valid', async () => { + renderWithIntl(