diff --git a/frontend/src/lib/planner/SwapSuggestionList.svelte b/frontend/src/lib/planner/SwapSuggestionList.svelte index d49210d..0049a93 100644 --- a/frontend/src/lib/planner/SwapSuggestionList.svelte +++ b/frontend/src/lib/planner/SwapSuggestionList.svelte @@ -43,9 +43,10 @@

- {replacingName}{#if replacingMeta}
{replacingMeta}{/if} + {replacingName}{#if replacingMeta} ยท {replacingMeta}{/if}
diff --git a/frontend/src/lib/planner/SwapSuggestionList.test.ts b/frontend/src/lib/planner/SwapSuggestionList.test.ts index 1313db4..d8b3294 100644 --- a/frontend/src/lib/planner/SwapSuggestionList.test.ts +++ b/frontend/src/lib/planner/SwapSuggestionList.test.ts @@ -30,6 +30,12 @@ describe('SwapSuggestionList', () => { expect(getComputedStyle(struck).textDecoration || struck.style.textDecoration).toContain('line-through'); }); + it('replacing-name span has title attribute for full name', () => { + render(SwapSuggestionList, { props: baseProps }); + const struck = screen.getByTestId('replacing-name'); + expect(struck.getAttribute('title')).toBe('Tomato pasta'); + }); + it('renders the easiest-first eyebrow label', () => { render(SwapSuggestionList, { props: baseProps }); expect(screen.getByText(/einfachste zuerst/i)).toBeTruthy();