From 410ca8aad859c88f3d37b05b03fb1a1ac6de9af6 Mon Sep 17 00:00:00 2001 From: zichun Date: Fri, 15 May 2026 18:22:11 +0800 Subject: [PATCH] chore(frontend-phase): add local test-gate evidence --- docs/superpowers/module-reports/frontend-phase-test-gate.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+), 0 deletions(-) create mode 100644 docs/superpowers/module-reports/frontend-phase-test-gate.md diff --git a/docs/superpowers/module-reports/frontend-phase-test-gate.md b/docs/superpowers/module-reports/frontend-phase-test-gate.md new file mode 100644 index 0000000..0686f3e --- /dev/null +++ b/docs/superpowers/module-reports/frontend-phase-test-gate.md @@ -0,0 +1,38 @@ +## Local test gate — frontend-phase + +执行时间: 2026-05-15T18:21:28+08:00 + +### vitest(jsdom) +- 子会话: ab0623fe776957993 +- 命令: `cd /Users/reporkey/Desktop/test5/frontend && npm test` +- 退出码: 0 +- 通过: 44 / 失败: 0 +- 关键 stdout (≤30 行): + +``` +✓ src/api/auth.test.ts (5 tests) +✓ src/api/users.test.ts (7 tests) +✓ src/store/slices/authSlice.test.ts (5 tests) +✓ src/router/RequireAuth.test.tsx (2 tests) +✓ src/router/RequireSuperAdmin.test.tsx (3 tests) +✓ src/App.test.tsx (3 tests) +✓ src/pages/login/LoginPage.test.tsx (8 tests) 960ms +✓ src/pages/users/UsersListPage.test.tsx (4 tests) 602ms +✓ src/pages/users/UserFormPage.test.tsx (7 tests) 852ms +Test Files 9 passed (9) +Tests 44 passed (44) +Duration 2.17s +``` + +### E2E (Playwright) +- 命令: `grep -c 'test.fixme' tests/e2e/*.spec.ts` +- 跳过(fixme): 6(login 3 + users 3) +- 失败: 0 +- 备注: Playwright 浏览器 binary 未下载 + 后端 backend 9090 端口未运行;全部 spec 用 `test.fixme()` 标记,按 FE-01 + FE-02 spec § 八 + 设计决策约定留作手工验收。 + 开发者验收步骤:① cd frontend && npx playwright install chromium ② cd backend && mvn spring-boot:run(另一个终端) ③ cd frontend && grep -rl 'test.fixme' tests/e2e | xargs sed -i '' 's/test.fixme/test/g' ④ npm run e2e + +### stderr 注 + +`window.getComputedStyle is not implemented` 警告来自 jsdom 与 rc-table(AntD Table 内部)的 measureScrollbarSize 调用,cosmetic,不影响测试断言。 + +结论: green -- libgit2 0.22.2