From fb860884857da73ee5b5e897745301cdf1d770a2 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Thu, 5 Oct 2023 18:58:30 +0200
Subject: refactor(components): make form components compliant with Eslint
 rules

---
 .../organisms/forms/contact-form/contact-form.test.tsx | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

(limited to 'src/components/organisms/forms/contact-form/contact-form.test.tsx')

diff --git a/src/components/organisms/forms/contact-form/contact-form.test.tsx b/src/components/organisms/forms/contact-form/contact-form.test.tsx
index d788e09..0e2685e 100644
--- a/src/components/organisms/forms/contact-form/contact-form.test.tsx
+++ b/src/components/organisms/forms/contact-form/contact-form.test.tsx
@@ -1,5 +1,5 @@
 import { describe, expect, it } from '@jest/globals';
-import { render, screen } from '../../../../../tests/utils';
+import { render, screen as rtlScreen } from '../../../../../tests/utils';
 import { ContactForm } from './contact-form';
 
 const props = {
@@ -12,38 +12,42 @@ describe('ContactForm', () => {
   it('renders a contact form', () => {
     render(<ContactForm {...props} />);
     expect(
-      screen.getByRole('form', { name: 'Contact form' })
+      rtlScreen.getByRole('form', { name: 'Contact form' })
     ).toBeInTheDocument();
   });
 
   it('renders a name field', () => {
     render(<ContactForm {...props} />);
-    expect(screen.getByRole('textbox', { name: /^Name:/ })).toBeInTheDocument();
+    expect(
+      rtlScreen.getByRole('textbox', { name: /^Name:/ })
+    ).toBeInTheDocument();
   });
 
   it('renders an email field', () => {
     render(<ContactForm {...props} />);
     expect(
-      screen.getByRole('textbox', { name: /^Email:/ })
+      rtlScreen.getByRole('textbox', { name: /^Email:/ })
     ).toBeInTheDocument();
   });
 
   it('renders an object field', () => {
     render(<ContactForm {...props} />);
     expect(
-      screen.getByRole('textbox', { name: /^Object:/ })
+      rtlScreen.getByRole('textbox', { name: /^Object:/ })
     ).toBeInTheDocument();
   });
 
   it('renders a message field', () => {
     render(<ContactForm {...props} />);
     expect(
-      screen.getByRole('textbox', { name: /^Message:/ })
+      rtlScreen.getByRole('textbox', { name: /^Message:/ })
     ).toBeInTheDocument();
   });
 
   it('renders a submit button', () => {
     render(<ContactForm {...props} />);
-    expect(screen.getByRole('button', { name: /^Send/ })).toBeInTheDocument();
+    expect(
+      rtlScreen.getByRole('button', { name: /^Send/ })
+    ).toBeInTheDocument();
   });
 });
-- 
cgit v1.2.3

