Files
imphnen-frontend-service/libs/ui/src/atoms/input/input.spec.tsx
T
Hafid Nur 542469bc67 feat: Update InputForm, Input, and auth page
- Perbaiki page login ke halaman utama backoffice
- Perbaiki component Input dan InputForm
2025-03-27 07:19:46 +07:00

16 lines
534 B
TypeScript

import { describe, it, expect } from 'vitest';
import { render, screen } from '@testing-library/react';
import { Input } from './input';
describe('Test Input Component', () => {
it('renders the input with placeholder text', () => {
render(<Input placeholder="Placeholder" />);
expect(screen.getByPlaceholderText('Placeholder')).toBeInTheDocument();
});
it("disables the input field when 'disabled' prop is set", () => {
render(<Input disabled />);
expect(screen.getByRole('textbox')).toBeDisabled();
});
});