feat(planner): J4 swap flow — action sheet + easiest-first suggestions #45

Merged
marcel merged 11 commits from feat/issue-29-swap-flow into master 2026-04-09 11:19:06 +02:00
2 changed files with 9 additions and 2 deletions
Showing only changes of commit 9482ecbf36 - Show all commits

View File

@@ -43,9 +43,10 @@
</p>
<span
data-testid="replacing-name"
style="font-family: var(--font-display); font-size: 14px; text-decoration: line-through; opacity: 0.6; color: var(--color-text);"
title={replacingName}
style="display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-size: 14px; text-decoration: line-through; opacity: 0.6; color: var(--color-text);"
>
{replacingName}{#if replacingMeta}<br />{replacingMeta}{/if}
{replacingName}{#if replacingMeta} · {replacingMeta}{/if}
</span>
</div>

View File

@@ -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();