test(auth): add multi-error test for empty form submission
Verifies all three validation errors (name, email, password) appear simultaneously when submitting a completely empty form. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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