feat: add svelte web workspace shell

This commit is contained in:
2026-07-18 16:40:09 +08:00
parent 833d9f094f
commit a758996799
26 changed files with 3090 additions and 7 deletions

View File

@@ -0,0 +1,25 @@
import '@testing-library/jest-dom/vitest';
import { render, screen } from '@testing-library/svelte';
import { describe, expect, it } from 'vitest';
import ProjectDashboard from './ProjectDashboard.svelte';
describe('ProjectDashboard', () => {
it('shows project counters', () => {
render(ProjectDashboard, {
props: {
summary: {
project_id: 1,
pending_inbox_count: 2,
open_task_count: 5,
recent_note_count: 3,
recent_session_count: 4,
},
},
});
expect(screen.getByText('待处理 Inbox')).toBeInTheDocument();
expect(screen.getByText('2')).toBeInTheDocument();
expect(screen.getByText('当前任务')).toBeInTheDocument();
expect(screen.getByText('5')).toBeInTheDocument();
});
});