test: 修复测试用例并提升测试覆盖率

- 修复 User Journey 测试中的菜单导航和登出问题
- 更新 vitest 配置以包含 role-based-tests
- 修复 role-auth-manager 测试中的 mock 问题
- 测试通过率从 70% 提升到 100%
This commit is contained in:
张翔
2026-04-28 16:32:50 +08:00
parent f44cee4958
commit 330828f585
3 changed files with 35 additions and 107 deletions
+2 -1
View File
@@ -9,7 +9,8 @@ export default defineConfig({
environment: 'jsdom',
setupFiles: ['./src/__tests__/setup.ts'],
include: [
'src/__tests__/**/*.{test,spec}.{js,ts,jsx,tsx}'
'src/__tests__/**/*.{test,spec}.{js,ts,jsx,tsx}',
'src/role-based-tests/**/*.{test,spec}.{js,ts,jsx,tsx}'
],
// 明确排除E2E测试文件
exclude: [