Frontend: design system, navigation, auth guard, signup screen #33
@@ -163,6 +163,18 @@ describe('SignupForm', () => {
|
||||
expect(screen.getByText('Ungültige E-Mail-Adresse')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('shows all three validation errors when form submitted empty', async () => {
|
||||
const user = userEvent.setup();
|
||||
render(SignupForm);
|
||||
|
||||
const submit = screen.getByRole('button', { name: /konto erstellen/i });
|
||||
await user.click(submit);
|
||||
|
||||
expect(screen.getByText('Name ist erforderlich')).toBeInTheDocument();
|
||||
expect(screen.getByText('Ungültige E-Mail-Adresse')).toBeInTheDocument();
|
||||
expect(screen.getByText('Mindestens 8 Zeichen')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('renders placeholders on inputs', () => {
|
||||
render(SignupForm);
|
||||
expect(screen.getByPlaceholderText('z.B. Sarah')).toBeInTheDocument();
|
||||
|
||||
Reference in New Issue
Block a user