test: align unit stubs and fixtures with the review-round changes
All checks were successful
CI / Unit & Component Tests (pull_request) Successful in 4m16s
CI / OCR Service Tests (pull_request) Successful in 23s
CI / Backend Unit Tests (pull_request) Successful in 4m17s
CI / fail2ban Regex (pull_request) Successful in 43s
CI / Semgrep Security Scan (pull_request) Successful in 23s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m5s

CI caught three spots the targeted local runs missed: the relevance-path
unit tests still stubbed findAllById (the path now calls findByIdIn — the
batchMetadata stubs legitimately keep findAllById), the second
GeschichtenCard test file still expected the removed email fallback, and
the AND/OR-toggle describe lacked the wait-for-slide-transition guard its
sibling describe documents — the flake that failed run 2208.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-06-10 08:37:31 +02:00
parent 4374f75d3c
commit a65a55448e
5 changed files with 14 additions and 11 deletions

View File

@@ -17,7 +17,6 @@ const makeGeschichte = (overrides: Record<string, unknown> = {}): GeschichteSumm
type: 'STORY' as const,
publishedAt: '2026-04-15T10:00:00Z',
author: {
email: 'a@b',
firstName: 'Anna',
lastName: 'Schmidt'
},
@@ -103,17 +102,17 @@ describe('GeschichtenCard', () => {
await expect.element(page.getByText(/Anna Schmidt/)).toBeVisible();
});
it('falls back to author email when no name', async () => {
it('falls back to [Unbekannt] when no name', async () => {
render(GeschichtenCard, {
props: baseProps({
geschichten: [
makeGeschichte({
author: { firstName: undefined, lastName: undefined, email: 'fallback@x' }
author: { firstName: undefined, lastName: undefined }
})
]
})
});
await expect.element(page.getByText(/fallback@x/)).toBeVisible();
await expect.element(page.getByText('[Unbekannt]')).toBeVisible();
});
});

View File

@@ -47,6 +47,10 @@ describe('SearchFilterBar AND/OR tag operator toggle', () => {
async function openAdvanced() {
const filterBtn = page.getByRole('button', { name: 'Filter', exact: true });
await filterBtn.click();
// Wait for slide transition to finish before interacting with contents —
// clicking during the transition triggers track_reactivity_loss in Svelte 5 async.js
// (same guard as the undated-only describe below; this block flaked in CI run 2208).
await expect.element(page.getByTestId('undated-only-toggle')).toBeVisible();
}
it('hides AND/OR toggle when fewer than 2 tags are selected', async () => {