fix(review): GeschichtenCard uses GeschichteSummary type; focus-visible on journey links; fix stale tests
All checks were successful
CI / Unit & Component Tests (pull_request) Successful in 3m17s
CI / OCR Service Tests (pull_request) Successful in 23s
CI / Backend Unit Tests (pull_request) Successful in 3m42s
CI / fail2ban Regex (pull_request) Successful in 47s
CI / Semgrep Security Scan (pull_request) Successful in 22s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m4s
All checks were successful
CI / Unit & Component Tests (pull_request) Successful in 3m17s
CI / OCR Service Tests (pull_request) Successful in 23s
CI / Backend Unit Tests (pull_request) Successful in 3m42s
CI / fail2ban Regex (pull_request) Successful in 47s
CI / Semgrep Security Scan (pull_request) Successful in 22s
CI / Compose Bucket Idempotency (pull_request) Successful in 1m4s
- GeschichtenCard.svelte: use GeschichteSummary instead of Geschichte (list endpoint returns summaries; no items/createdAt/updatedAt needed) - GeschichtenCard.svelte.test.ts: factory returns GeschichteSummary with lean author shape; drop Geschichte-only fields (createdAt, groups, etc.) - geschichten/[id]/+page.svelte: add focus:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring to journey item document links (WCAG 2.4.7) - page.svelte.test.ts ([id]): replace stale documents[] factory field with items[]; test now checks placeholder text + note caption - page.svelte.test.ts (new): remove removed initialDocuments from baseData; rename test to reflect that only initialPersons is passed through Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,8 +21,7 @@ const { default: GeschichtenNewPage } = await import('./+page.svelte');
|
||||
afterEach(cleanup);
|
||||
|
||||
const baseData = {
|
||||
initialPersons: [] as { id: string; displayName: string }[],
|
||||
initialDocuments: [] as { id: string; title: string }[]
|
||||
initialPersons: [] as { id: string; displayName: string }[]
|
||||
};
|
||||
|
||||
describe('geschichten/new page', () => {
|
||||
@@ -53,18 +52,15 @@ describe('geschichten/new page', () => {
|
||||
expect(inputs.length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
it('passes initialPersons and initialDocuments through to the editor', async () => {
|
||||
it('passes initialPersons through to the editor', async () => {
|
||||
render(GeschichtenNewPage, {
|
||||
props: {
|
||||
data: {
|
||||
initialPersons: [{ id: 'p1', displayName: 'Anna Schmidt' }],
|
||||
initialDocuments: [{ id: 'd1', title: 'Brief 1923' }]
|
||||
initialPersons: [{ id: 'p1', displayName: 'Anna Schmidt' }]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Both should appear somewhere in the rendered editor
|
||||
await expect.element(page.getByText('Anna Schmidt')).toBeVisible();
|
||||
await expect.element(page.getByText('Brief 1923')).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user