feat: login example

This commit is contained in:
Maulana Sodiqin
2025-04-03 12:21:10 +07:00
parent c05061becf
commit a6fea630a4
38 changed files with 942 additions and 755 deletions
@@ -0,0 +1,20 @@
import { render, screen } from '@testing-library/react';
import { InputField } from './input-field';
describe('InputForm Component', () => {
it('renders correctly with disabled prop', () => {
render(<InputField label="Test Label" disabled={true} />);
const input = screen.getByLabelText('Test Label');
expect(input).toBeDisabled();
expect(input).toHaveClass('opacity-50 cursor-not-allowed');
});
it('renders correctly without disabled prop', () => {
render(<InputField label="Test Label" disabled={false} />);
const input = screen.getByLabelText('Test Label');
expect(input).not.toBeDisabled();
expect(input).not.toHaveClass('opacity-50 cursor-not-allowed');
});
});