diff --git a/frontend/src/lib/components/GeschichtenCard.svelte b/frontend/src/lib/components/GeschichtenCard.svelte index b97d1142..e5d840f5 100644 --- a/frontend/src/lib/components/GeschichtenCard.svelte +++ b/frontend/src/lib/components/GeschichtenCard.svelte @@ -53,22 +53,24 @@ function authorName(g: Geschichte): string { {/if} -
- {authorName(g)} - {#if formatPublishedDate(g)}· {formatPublishedDate(g)}{/if} -
- {#if g.body} -{plainExcerpt(g.body, 80)}
- {/if}Some body excerpt text
')], + personId: 'p1', + personName: 'Franz', + canWrite: false + }); + // The body-excerpt text is inside the same as the title. + const links = await page.getByRole('link', { name: /A title/ }).all(); + expect(links.length).toBeGreaterThan(0); + const linkEl = await links[0].element(); + expect(linkEl.tagName).toBe('A'); + expect(linkEl.textContent).toContain('Some body excerpt text'); }); it('hides the "+ Geschichte schreiben" link when canWrite is false', async () => {