- {title}
+
+

+
+ {title}
+
{#if doc.summary}
diff --git a/frontend/src/lib/components/ThumbnailRow.svelte.spec.ts b/frontend/src/lib/components/ThumbnailRow.svelte.spec.ts
index 97130ad6..e8d46587 100644
--- a/frontend/src/lib/components/ThumbnailRow.svelte.spec.ts
+++ b/frontend/src/lib/components/ThumbnailRow.svelte.spec.ts
@@ -109,12 +109,42 @@ describe('ThumbnailRow', () => {
});
const titleEl = [...document.querySelectorAll('div')].find(
- (el) => el.textContent?.trim() === 'Liebe Anna'
+ (el) => el.textContent?.trim() === 'Liebe Anna' && el.className.includes('truncate')
) as HTMLElement | undefined;
expect(titleEl, 'title element not found').toBeDefined();
expect(titleEl!.className).toContain('text-lg');
});
+ it('renders a right-arrow icon for outgoing letters', () => {
+ render(ThumbnailRow, {
+ doc: baseDoc,
+ isOut: true,
+ showOtherParty: false
+ });
+
+ const arrow = document.querySelector(
+ '[data-testid="thumb-row-direction-icon"]'
+ ) as HTMLImageElement | null;
+ expect(arrow).not.toBeNull();
+ expect(arrow!.getAttribute('src') ?? '').toMatch(/Long-Arrow-Right/);
+ // Decorative — direction is already announced via the aria-label prefix.
+ expect(arrow!.getAttribute('aria-hidden')).toBe('true');
+ });
+
+ it('renders a left-arrow icon for incoming letters', () => {
+ render(ThumbnailRow, {
+ doc: baseDoc,
+ isOut: false,
+ showOtherParty: false
+ });
+
+ const arrow = document.querySelector(
+ '[data-testid="thumb-row-direction-icon"]'
+ ) as HTMLImageElement | null;
+ expect(arrow).not.toBeNull();
+ expect(arrow!.getAttribute('src') ?? '').toMatch(/Long-Arrow-Left/);
+ });
+
it('sets border-l class based on isOut', () => {
const { unmount } = render(ThumbnailRow, {
doc: baseDoc,