From 2b70c89962a18f33995fcca762fed73fd5ce8f28 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 1 Apr 2022 22:46:07 +0200
Subject: chore: add labelled field component

---
 src/components/atoms/forms/field.test.tsx | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

(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
index 5488220..a04a976 100644
--- a/src/components/atoms/forms/field.test.tsx
+++ b/src/components/atoms/forms/field.test.tsx
@@ -3,12 +3,28 @@ import Field from './field';
 
 describe('Field', () => {
   it('renders a text input', () => {
-    render(<Field type="text" value="" setValue={() => null} />);
+    render(
+      <Field
+        id="text-field"
+        name="text-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} />);
+    render(
+      <Field
+        id="search-field"
+        name="search-field"
+        type="search"
+        value=""
+        setValue={() => null}
+      />
+    );
     expect(screen.getByRole('searchbox')).toHaveAttribute('type', 'search');
   });
 });
-- 
cgit v1.2.3

