Blizzard
|
a742d118ad
|
test(web): 薄 Web 面加 RTL 组件测试 —— 补最大覆盖缺口 (P1)
完成度审计:web 端几乎零覆盖(仅3个 api 纯逻辑用例、无任何组件测试)——三前端里
最薄。补上 RTL 基建 + 入口流组件测试。
- 加 @testing-library/react+jest-dom+user-event,src/test/setup.ts,
vitest setupFiles 接入。
- AuthPage.test.tsx(5 例,mock api 层):登录/注册态切换(名字字段显隐)、
邮箱密码空时按钮禁用、登录成功回调 onAuthed 且带对参数、登录失败显示后端
错误文案不回调、注册态走 authRegister 带名字。
web 测试 3→8。CI web 矩阵已跑 npm test,自动纳入关卡。
tsc + 三前端(desktop 68/admin 41/web 8)全绿。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-07-18 12:28:57 +08:00 |
|