From b145ed4492de834f5cea9437e9772c4f7fbe90ec Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Thu, 31 Mar 2022 17:57:39 +0200
Subject: chore: add a Field component

---
 src/components/atoms/forms/field.test.tsx | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 src/components/atoms/forms/field.test.tsx

(limited to 'src/components/atoms/forms/field.test.tsx')

diff --git a/src/components/atoms/forms/field.test.tsx b/src/components/atoms/forms/field.test.tsx
new file mode 100644
index 0000000..5488220
--- /dev/null
+++ b/src/components/atoms/forms/field.test.tsx
@@ -0,0 +1,14 @@
+import { render, screen } from '@test-utils';
+import Field from './field';
+
+describe('Field', () => {
+  it('renders a text input', () => {
+    render(<Field type="text" value="" setValue={() => null} />);
+    expect(screen.getByRole('textbox')).toHaveAttribute('type', 'text');
+  });
+
+  it('renders a search input', () => {
+    render(<Field type="search" value="" setValue={() => null} />);
+    expect(screen.getByRole('searchbox')).toHaveAttribute('type', 'search');
+  });
+});
-- 
cgit v1.2.3

