feat(frontend): add DocumentRow component with two-column layout, highlights, progress, contributors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-19 23:44:31 +02:00
parent ae0e3b271d
commit 648aa2a742
2 changed files with 186 additions and 3 deletions

View File

@@ -1,14 +1,25 @@
import { afterEach, describe, expect, it, vi } from 'vitest';
import { cleanup, render } from 'vitest-browser-svelte';
import { page } from 'vitest/browser';
import type { components } from '$lib/generated/api';
import Page from './+page.svelte';
type User = components['schemas']['AppUser'];
afterEach(cleanup);
vi.mock('$app/navigation', () => ({ goto: vi.fn(), invalidateAll: vi.fn() }));
const baseData = {
user: { firstName: 'Max' },
user: {
id: 'u1',
email: 'max@example.com',
firstName: 'Max',
lastName: '',
groups: [],
enabled: true,
createdAt: '2024-01-01T00:00:00Z'
} as User,
canWrite: true,
canAnnotate: false,
resumeDoc: null,
@@ -48,8 +59,7 @@ describe('Home page dashboard layout', () => {
title: 'Geburtsurkunde',
caption: 'Max · 1920',
excerpt: 'Hiermit…',
page: 1,
pages: 3,
totalBlocks: 3,
pct: 33,
collaborators: []
};