diff --git a/src/components/forms/InputFormControl.tsx b/src/components/forms/InputFormControl.tsx index e18dc0a..5a07e29 100644 --- a/src/components/forms/InputFormControl.tsx +++ b/src/components/forms/InputFormControl.tsx @@ -62,7 +62,6 @@ const InputFormControl = ({ input: { 'aria-invalid': !!error, 'aria-labelledby': `${name}-label`, - pattern: name || 'text', ...inputSlotProps, }, }} diff --git a/src/views/SignIn/SignIn.test.tsx b/src/views/SignIn/SignIn.test.tsx index b3ac9f5..33e7c04 100644 --- a/src/views/SignIn/SignIn.test.tsx +++ b/src/views/SignIn/SignIn.test.tsx @@ -49,12 +49,14 @@ describe('SignIn', () => { // Type the password into the password field await user.type( - screen.getByRole('textbox', { name: /password/i }), + screen.getByLabelText(/password/i, { + selector: 'input', + }), 'password' ) // Save the form - await user.click(screen.getByRole('button', { name: /^login$/i })) + await user.click(screen.getByRole('button', { name: /login/i })) // Wait for form submission to complete waitFor(() => { diff --git a/src/views/SignIn/SignIn.tsx b/src/views/SignIn/SignIn.tsx index 0f32130..e51d76d 100644 --- a/src/views/SignIn/SignIn.tsx +++ b/src/views/SignIn/SignIn.tsx @@ -10,7 +10,8 @@ import Stack from '@mui/material/Stack' import Typography from '@mui/material/Typography' import useMediaQuery from '@mui/material/useMediaQuery' import InputFormControl from '@/components/forms/InputFormControl' -import LinearIndeterminate from '@/components/mui/LinearLoadingBar' +import CircularProgress from '@mui/material/CircularProgress' +import Backdrop from '@mui/material/Backdrop' import PasswordVisibilityToggle from '@/components/PasswordVisibilityToggle' import SubmitButton from '@/components/forms/SubmitButton' import BlankLayout from '@/layouts/BlankLayout' @@ -119,7 +120,9 @@ const SignIn = () => { control={control} name="password" InputProps={{ + autoComplete: 'current-password', endAdornment: , + type: showPassword ? 'text' : 'password', }} /> { name="login" role="button" > - Login + Sign In + {loading && ( + + + + )} or... @@ -143,10 +151,6 @@ const SignIn = () => { {/* End of Form */} - - {loading && ( - - )}