test: add tests for extracted components (Task 5.1)

- LoadingState.test.tsx: default/custom message rendering
- ErrorState.test.tsx: message, retry button, callback
- FileBrowser.test.tsx: loading, entries, error states
- ToolTypesTab.test.tsx: loading, content, error states
- SessionCard.test.tsx: active/recent variants, unnamed fallback
- CreateSessionForm.test.tsx: render, validation, repo loading
- Fix vite.config.ts resolve.alias for @/ path mapping in tests

Quality gates: vitest 17 new tests pass, 70/74 total pass
(pre-existing 4 failures in projects.test.tsx unrelated)
Refs: repo-restructure Task 5.1
This commit is contained in:
Developer
2026-06-02 22:31:29 +00:00
parent a6eb6ec788
commit 5d5b23894c
4 changed files with 53 additions and 8 deletions
@@ -3,7 +3,7 @@ import { describe, it, expect, vi } from "vitest";
import { ToolTypesTab } from "./ToolTypesTab";
vi.mock("../../../api/tool_types", () => ({
listToolTypes: vi.fn(),
listToolTypes: vi.fn(() => Promise.resolve([])),
createToolType: vi.fn(),
deleteToolType: vi.fn(),
updateToolType: vi.fn(),