feat(recipes): image upload, fix save 500, HelloFresh seed data #53

Merged
marcel merged 50 commits from feat/issue-46-wire-suggestions-recipe-picker into master 2026-04-10 10:18:10 +02:00
2 changed files with 21 additions and 9 deletions
Showing only changes of commit 7359eba946 - Show all commits

View File

@@ -88,15 +88,17 @@
{/snippet} {/snippet}
<div style="background: var(--color-page); font-family: var(--font-sans);"> <div style="background: var(--color-page); font-family: var(--font-sans);">
<!-- Header --> <!-- Header (hidden in swap context — the panel/sheet title already provides context) -->
<div style="padding: 10px 12px 6px; border-bottom: 1px solid var(--color-border);"> {#if !replacingRecipe}
<p style="font-family: var(--font-display); font-size: 14px; font-weight: 500; color: var(--color-text); margin: 0;"> <div style="padding: 10px 12px 6px; border-bottom: 1px solid var(--color-border);">
Rezept wählen <p style="font-family: var(--font-display); font-size: 14px; font-weight: 500; color: var(--color-text); margin: 0;">
</p> Rezept wählen
<p style="font-size: 11px; color: var(--color-text-muted); margin: 2px 0 0;"> </p>
{dateLabel} <p style="font-size: 11px; color: var(--color-text-muted); margin: 2px 0 0;">
</p> {dateLabel}
</div> </p>
</div>
{/if}
<!-- Wird ersetzt banner (swap context) --> <!-- Wird ersetzt banner (swap context) -->
{#if replacingRecipe} {#if replacingRecipe}

View File

@@ -186,6 +186,16 @@ describe('RecipePicker', () => {
expect(screen.queryByText(/Wird ersetzt/i)).toBeNull(); expect(screen.queryByText(/Wird ersetzt/i)).toBeNull();
}); });
it('hides Rezept wählen header when replacingRecipe is set', () => {
render(RecipePicker, { props: { ...baseProps, replacingRecipe: { name: 'Pasta' } } });
expect(screen.queryByText(/Rezept wählen/i)).toBeNull();
});
it('shows Rezept wählen header when replacingRecipe is not set', () => {
render(RecipePicker, { props: baseProps });
expect(screen.getByText(/Rezept wählen/i)).toBeTruthy();
});
it('excludes recipe from Alle Rezepte when excludeRecipeId is set', () => { it('excludes recipe from Alle Rezepte when excludeRecipeId is set', () => {
render(RecipePicker, { props: { ...baseProps, excludeRecipeId: 'r2' } }); render(RecipePicker, { props: { ...baseProps, excludeRecipeId: 'r2' } });
expect(screen.queryByText('Spaghetti Carbonara')).toBeNull(); expect(screen.queryByText('Spaghetti Carbonara')).toBeNull();