Files
ssw-mvp/docs/e2e/cases/TC-DOC-009.mjs
T
admin 3247e9fd15 init: ssw-mvp initial commit
- boot/ (Java/Maven, JNPF 7.0) — 移除旧的 boot/.git,源码直接纳入仓库
- web/ (Vue 3 + Vite + Ant Design Vue, pnpm)
- docs/, scard/, nax/
- refs/INDEX.md + refs/国标/(其余 refs/* 开源子仓库不纳入)
- 已忽略: connector_data/, jweb/, log/, web/{dist,node_modules,.pnpm}, boot/*/target/, .DS_Store, .idea, .vscode
2026-08-05 18:29:12 +08:00

40 lines
1.8 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* TC-DOC-009 · 内部及与产品一致
* Q-DOC 文档完整性 · 正向 · P1
* 预期:文档的内部以及与产品之间应一致
*/
export const meta = { tc: 'TC-DOC-009', req: 'Q-DOC', title: '内部及与产品一致', type: '正向', priority: 'P1', needs: ['manual'] }
export async function run(t) {
// 相对路径基于进程 cwd(docs/e2e/),故 ../ 即 docs/ 根目录
const fs = await import('node:fs')
// 功能清单.md 存在于 docs/ 根目录
let fl = null
try {
fl = fs.readFileSync('../功能清单.md', 'utf8')
} catch (e) {
t.log(`⚠ 功能清单读取失败:${e.message}`)
}
// 自动化仅校验文件存在且非空;功能清单采用「N.N」章节编号(如 1.1),
// 与 REQ-005 等编号体系不同,REQ↔章节映射转人工核对,避免字符串字面量误判
t.assert(!!fl && fl.length > 0, `功能清单.md 存在且非空(../功能清单.md)`)
// 核对页面(尚数网测评_测试用例核对.html)在仓库中不存在 —— 容错转为人工核对,不因此崩溃
let html = null
try {
html = fs.readFileSync('../尚数网测评_测试用例核对.html', 'utf8')
} catch {
html = null
}
if (html) {
for (const req of ['REQ-005', 'REQ-012', 'REQ-022']) {
t.assert(html.includes(req), `${req} 在核对页面有对应记录`)
}
} else {
t.log('⚠ 尚数网测评_测试用例核对.html 在仓库中不存在,该部分转人工核对')
}
t.manual([
'人工核对一致性:',
'1) 文档内部:docs/arch/REQUIREMENT_MATRIX.md 与 docs/功能清单.md 的 REQ 编号、状态描述一致;',
'2) 文档与产品:核对页面(尚数网测评_测试用例核对.html,当前仓库缺失)的「已实现/部分实现/未实现」与实际 UI/API 一致——补齐该文件后重测。'
].join('\n'))
}