ts fixes from reorg + unit test work
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 1m30s
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 1m30s
This commit is contained in:
@@ -12,14 +12,14 @@ vi.mock('./PasswordStrengthIndicator', () => ({
|
||||
|
||||
describe('PasswordInput (in auth feature)', () => {
|
||||
it('should render as a password input by default', () => {
|
||||
render(<PasswordInput />);
|
||||
const input = screen.getByRole('textbox'); // It's a textbox role even with type password
|
||||
render(<PasswordInput placeholder="Enter password" />);
|
||||
const input = screen.getByPlaceholderText('Enter password');
|
||||
expect(input).toHaveAttribute('type', 'password');
|
||||
});
|
||||
|
||||
it('should toggle input type between password and text when the eye icon is clicked', () => {
|
||||
render(<PasswordInput />);
|
||||
const input = screen.getByRole('textbox');
|
||||
render(<PasswordInput placeholder="Enter password" />);
|
||||
const input = screen.getByPlaceholderText('Enter password');
|
||||
const toggleButton = screen.getByRole('button', { name: /show password/i });
|
||||
|
||||
// Initial state
|
||||
|
||||
Reference in New Issue
Block a user