feat(onboarding): A2 — Household setup page #34

Merged
marcel merged 11 commits from feat/issue-19-household-setup into master 2026-04-02 19:39:09 +02:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit 7c66dcad3a - Show all commits

View File

@@ -41,7 +41,9 @@ describe('HouseholdSetupForm', () => {
const user = userEvent.setup();
render(HouseholdSetupForm);
// override disabled to allow submit attempt by typing then clearing
// Type then clear: sets touched=true, which makes the $derived error visible
// as soon as the field is empty. The button is disabled so the click is a no-op,
// but the error is already shown from the touched+empty state.
const input = screen.getByLabelText('Haushaltsname');
await user.type(input, 'a');
await user.clear(input);

View File

@@ -71,8 +71,7 @@ describe('household setup — form action', () => {
function mockSuccess() {
return {
data: { data: { id: 'hh-123', name: 'Smith family', members: [] } },
error: undefined,
response: { headers: { get: vi.fn().mockReturnValue(null) } }
error: undefined
};
}