diff --git a/src/app/components/auth/__tests__/FormInput.test.tsx b/src/app/components/auth/__tests__/FormInput.test.tsx index df97d530..b8fbfcd3 100644 --- a/src/app/components/auth/__tests__/FormInput.test.tsx +++ b/src/app/components/auth/__tests__/FormInput.test.tsx @@ -57,9 +57,15 @@ describe('Auth FormInput', () => { fireEvent.click(toggle); expect(input).toHaveAttribute('type', 'text'); - expect(screen.getByRole('button', { name: 'Hide Password' })).toHaveAttribute( + const hideToggle = screen.getByRole('button', { name: 'Hide Password' }); + expect(hideToggle).toHaveAttribute('aria-pressed', 'true'); + + fireEvent.click(hideToggle); + + expect(input).toHaveAttribute('type', 'password'); + expect(screen.getByRole('button', { name: 'Show Password' })).toHaveAttribute( 'aria-pressed', - 'true', + 'false', ); }); });