Commit Graph

3 Commits

Author SHA1 Message Date
Jason
bbf830a1da test: add frontend testing infrastructure with vitest
- Introduce Vitest + React Testing Library + jsdom environment
- Add useDragSort hook unit tests covering:
  * Sorting logic (sortIndex → createdAt → name)
  * Successful drag operation (API call + cache invalidation)
  * Failed drag operation (error toast display)
  * Edge case (no valid target, no API call)
- Configure global test setup (i18n mock, auto cleanup)
- Update TypeScript configs to include tests/ directory
- Add test development plan documentation

Test Coverage:
  ✓ Provider drag-and-drop sorting core logic
  ✓ React Query cache refresh
  ✓ Toast notification display
  ✓ Boundary condition handling

Test Results: 4/4 passed (671ms)
Next Steps: Sprint 2 - component tests with MSW mock layer
2025-10-25 10:08:06 +08:00
TinsFox
5af476d376 feat: 系统托盘 (#12)
* feat: 系统托盘

1. 添加系统托盘
2. 托盘添加切换供应商功能
3. 整理组件目录

* feat: 优化系统托盘菜单结构

- 扁平化Claude和Codex的菜单结构,直接将所有供应商添加到主菜单,简化用户交互。
- 添加无供应商时的提示信息,提升用户体验。
- 更新分隔符文本以增强可读性。

* feat: integrate Tailwind CSS and Lucide icons

- Added Tailwind CSS for styling and layout improvements.
- Integrated Lucide icons for enhanced UI elements.
- Updated project structure by removing unused CSS files and components.
- Refactored configuration files to support new styling and component structure.
- Introduced new components for managing providers with improved UI interactions.   

* fix: 修复类型声明和分隔符实现问题

- 修复 updateTrayMenu 返回类型不一致(Promise<void> -> Promise<boolean>)
- 添加缺失的 UnlistenFn 类型导入
- 使用 MenuBuilder.separator() 替代文本分隔符

---------

Co-authored-by: farion1231 <farion1231@gmail.c
2025-09-06 16:21:21 +08:00
farion1231
e0a9c1ab4c initial commit 2025-08-04 22:16:26 +08:00