Files
ssw-mvp/docs/e2e/cases/TC-PROD-001.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

64 lines
2.6 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-PROD-001 · 按说明可正常使用产品
* REQ-Q-PROD 质量特性-产品说明 正向 P1
*
* 前置:1. 系统已部署并正常运行 2. 网络及测试环境可用
* 步骤:1. 依据产品说明操作使用产品 2. 验证功能可用
* 预期:1. 用户按照产品说明可正常使用该产品
*
* 浏览器自动化无法核对产品说明(功能清单、技术协议)的"完整性"与"可读性"。
* 但可对产品说明里"声称的能力"做抽样实测:访问核心菜单/页面,对比功能清单的章节是否都已可访问、表单是否可提交。
*/
export const meta = {
tc: 'TC-PROD-001',
req: 'Q-PROD',
title: '按说明可正常使用产品',
type: '正向',
priority: 'P1',
route: '',
needs: ['fe', 'be']
}
export async function run(t) {
/**
* 核对清单:功能清单.md 1~19 章里 100 个功能点对应的关键页面(从 web/src/router/modules/*.ts
* 派生)。这里只挑 6 个最具代表性的页面抽样验证,确保每条产品说明都有实页面可打开。
*/
const samples = [
{ route: '/tds/spaces', expectTitle: '可信数据空间' }, // [FL-2.1] 逻辑空间创建/删除
{ route: '/tds/connectors', expectTitle: '连接器接入' }, // [FL-3.1] 连接器注册/注销
{ route: '/tds/catalog', expectTitle: '目录管理' }, // [FL-4.2] 公共数据目录
{ route: '/tds/contracts', expectTitle: '数字合约' }, // [FL-5.2] 合约创建/签署
{ route: '/tds/policies', expectTitle: '使用控制策略' }, // [FL-5.1] 策略模板
{ route: '/tds/audit', expectTitle: '审计日志' } // [FL-15.1] 全链路操作日志
]
await t.step('前置:登录并准备逐页核对', async () => {
await t.login()
})
for (const s of samples) {
await t.step(`访问 ${s.route} 并核对可正常使用`, async () => {
await t.goto(s.route)
await t.expectTitle(s.expectTitle)
t.assert(true, `按产品说明 ${s.route} 可正常打开并使用(标题「${s.expectTitle}」)`)
})
}
await t.step('核对核心功能可用:能在策略页新建一条模板', async () => {
await t.goto('/tds/policies')
await t.pickSpace()
const code = t.uid('PROD001')
await t.create({
策略标识: code,
策略名称: `PROD-001-功能可用性抽样-${t.runId}`,
策略类型: '时限',
适用场景: 'PROD-001 产品说明可用性抽样 - 24h 单次',
规则内容: '{"maxHours":24}'
})
t.assert(true, `核心功能【新建策略模板】实际可用(code=${code})`)
})
t.expectConsoleClean()
}