fix(planner): add truncation and title attribute to replacing-name span
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -43,9 +43,10 @@
|
|||||||
</p>
|
</p>
|
||||||
<span
|
<span
|
||||||
data-testid="replacing-name"
|
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>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,12 @@ describe('SwapSuggestionList', () => {
|
|||||||
expect(getComputedStyle(struck).textDecoration || struck.style.textDecoration).toContain('line-through');
|
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', () => {
|
it('renders the easiest-first eyebrow label', () => {
|
||||||
render(SwapSuggestionList, { props: baseProps });
|
render(SwapSuggestionList, { props: baseProps });
|
||||||
expect(screen.getByText(/einfachste zuerst/i)).toBeTruthy();
|
expect(screen.getByText(/einfachste zuerst/i)).toBeTruthy();
|
||||||
|
|||||||
Reference in New Issue
Block a user