From f5518d2a052c8fb625765e9fa1dc49b01ea9dc8b Mon Sep 17 00:00:00 2001
From: Alberto Defendi <1369-ahl-berto@users.noreply.gitlab.inf.unibz.it>
Date: Wed, 24 Mar 2021 17:24:38 +0100
Subject: [PATCH] Fix broken test from refactor

---
 src/App.tsx                                            | 4 +++-
 src/components/AuthUser/SignInForm/SignInForm.test.tsx | 4 ++--
 src/components/AuthUser/SignInForm/SignInForm.tsx      | 6 +-----
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/App.tsx b/src/App.tsx
index 08265a5..694bde2 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -6,7 +6,9 @@ export const App: FC = () => (
   <Router>
     <Switch>
       <Route path="/">
-        <AuthUser />
+        <div data-testid="App">
+          <AuthUser />
+        </div>
       </Route>
     </Switch>
   </Router>
diff --git a/src/components/AuthUser/SignInForm/SignInForm.test.tsx b/src/components/AuthUser/SignInForm/SignInForm.test.tsx
index 4b8fa29..d01b0d3 100644
--- a/src/components/AuthUser/SignInForm/SignInForm.test.tsx
+++ b/src/components/AuthUser/SignInForm/SignInForm.test.tsx
@@ -3,8 +3,8 @@ import { render, fireEvent } from '@testing-library/react';
 import { SignInForm } from './SignInForm';
 
 describe('<SignInForm />', () => {
-  it('it should render form', () => {
+  it('should render form', () => {
     const wrapper = render(<SignInForm />);
-    expect(wrapper.queryByTestId('SignInForm')).toBeTruthy();
+    expect(wrapper.queryByTestId('Form')).toBeTruthy();
   });
 });
diff --git a/src/components/AuthUser/SignInForm/SignInForm.tsx b/src/components/AuthUser/SignInForm/SignInForm.tsx
index 288247f..344b6bf 100644
--- a/src/components/AuthUser/SignInForm/SignInForm.tsx
+++ b/src/components/AuthUser/SignInForm/SignInForm.tsx
@@ -44,11 +44,7 @@ export const SignInForm: React.FC = () => {
   const classes = useStyles();
 
   return (
-    <form
-      className={classes.form}
-      onSubmit={handleSubmit}
-      data-testid="LoginForm"
-    >
+    <form className={classes.form} onSubmit={handleSubmit} data-testid="Form">
       <TextField
         variant="outlined"
         margin="normal"
-- 
GitLab