Commit Graph
2 Commits
Author SHA1 Message Date
sswandClaude 6210a273c6 fix(tests): P2 — test tsc errors 18→0 (tsc now fully 0/51)
- 4 AppContext fixtures (blindspot_guards/bs54_guard/dbLinkId/verify_option):
  add topLevelMenus:[] + currentSystemId:'' (fields added in BS-109, fixtures drifted)
- CreateOpts: add internal __aiBuildFormData?:{formData} hook (was (opts as any));
  fixes 3 form_create_smartprops_ai.test.ts errors
- e2e/_helpers/nav.ts: /// <reference lib=dom /> for page.evaluate browser context
  (resolves document/HTMLElement + item/e unknown)
- bs66-70 test: type formVm as Set<string>
- auto_fix.test: gX1!.candidates!  ; defhttp test: HeadersInit → Record<string,string>
- output_filter.test: cast stdout spy to declared MockInstance type

Verified: tsc 0 errors; vitest unit 361 pass / 19 fail == pre-existing
(blindspot_guards registry drift + doc-md-slice fixture, audit §12.2) — no regression.

Co-Authored-By: Claude <[email protected]>
2026-07-24 09:47:46 +08:00
sswandClaude da7f2639b0 refactor(tests): 移到 dacli/tests/integration/audit/ + 业务起源说明 docs/dos
用户反馈 2026-07-07: 测试文件放 dacli/ 根目录混淆, 应区分业务/通用.
  - 业务特定 (dos 26 P0 漏洞) → docs/dos
  - 通用 dacli 能力 → dacli/tests/

之前: dacli/test_audit_bs66_70.ts + test_audit_bs71_74.ts (放根目录)
现在: dacli/tests/integration/audit/ (与现有 unit/integration/e2e 结构匹配)
  - bs66-70-audit-enhance.test.ts (BS-新66~70 audit 增强, 5/5 mock)
  - bs71-74-endpoint-fix.test.ts (BS-新71~74 端点修复, 5/5 端点/源码)

import 路径修复: './src/...' → '../../../src/...' (3 层目录深度)

docs/dos/plan.md §12 加业务起源引用:
  - 业务起源 (为什么有这些盲点): docs/dos/debug.md §5
  - 通用测试 (dacli audit + 字段提取 + cascade): dacli/tests/integration/audit/
  - 命名约定: bs<num>-<desc>.test.ts (BS 编号 + 描述, vitest 识别 .test.ts 后缀)

测试验证 (测试文件位置调整后):
  npx tsx tests/integration/audit/bs66-70-audit-enhance.test.ts  → 5/5 PASS
  npx tsx tests/integration/audit/bs71-74-endpoint-fix.test.ts  → 5/5 PASS

Co-Authored-By: Claude <[email protected]>
2026-07-07 15:27:40 +08:00