- 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
72 lines
2.7 KiB
JavaScript
72 lines
2.7 KiB
JavaScript
/**
|
||
* TC-USAGE-008 · 查看控制策略执行的办理结果
|
||
* REQ-017 [FL-6.1] 反向/错误推测 P1
|
||
*
|
||
* 前置:1. 已完成一次控制策略执行操作
|
||
* 2. 用户有查看记录的权限
|
||
* 步骤:1. 打开服务平台的【数据使用控制】
|
||
* 2. 查询刚办理的记录
|
||
* 3. 查看详情和相关记录
|
||
* 预期:能查到正确的控制策略执行结果,列表、详情和相关记录一致。
|
||
*/
|
||
export const meta = {
|
||
tc: 'TC-USAGE-008',
|
||
req: 'REQ-017',
|
||
title: '查看控制策略执行的办理结果',
|
||
type: '反向/错误推测',
|
||
priority: 'P1',
|
||
route: '/tdc/sandbox',
|
||
needs: ['fe', 'be']
|
||
}
|
||
|
||
export async function run(t) {
|
||
let target = null
|
||
|
||
await t.step('前置:登录、打开【可信沙箱】并取一条沙箱任务', async () => {
|
||
await t.login()
|
||
await t.goto('/tdc/sandbox')
|
||
await t.expectTitle('可信沙箱')
|
||
const list = await t.apiList('/api/ssw/tdc/DeliveryTask')
|
||
const sb = list.find((r) => r.deliveryType === 'SANDBOX')
|
||
if (!sb) t.skip('库中无任何 SANDBOX 类型交付任务')
|
||
target = sb
|
||
t.assert(true, `选定查看对象:${target.taskNo}(${target.id})`)
|
||
})
|
||
|
||
await t.step('用 taskNo 在沙箱页查询', async () => {
|
||
await t.search(target.taskNo)
|
||
await t.expectRow(target.taskNo)
|
||
t.assert(true, `沙箱列表中可查到任务 ${target.taskNo}`)
|
||
})
|
||
|
||
await t.step('核对列表展示与后端记录一致', async () => {
|
||
const table = await t.readTable()
|
||
const row = table.find((cells) => cells.some((c) => c.includes(target.taskNo)))
|
||
t.assert(!!row, '查询结果命中目标记录')
|
||
if (target.productName) {
|
||
t.assert(
|
||
row.some((c) => c.includes(target.productName)),
|
||
`列表中的数据产品与后端一致(${target.productName})`
|
||
)
|
||
}
|
||
})
|
||
|
||
await t.step('核对后端 info 接口回显与列表一致', async () => {
|
||
const info = await t.api('GET', `/api/ssw/tdc/DeliveryTask/${target.id}`)
|
||
t.assert(info.code === 200 && info.data, `info 接口可查(code=${info.code})`)
|
||
t.assert(info.data.taskNo === target.taskNo, `taskNo 回显一致(${info.data.taskNo})`)
|
||
t.assert(info.data.deliveryType === 'SANDBOX', `deliveryType 回显为 SANDBOX(实际 ${info.data.deliveryType})`)
|
||
})
|
||
|
||
await t.step('核对运行日志接口(沙箱特有)', async () => {
|
||
if (target.runStatus === 'SUCCESS') {
|
||
const log = await t.api('GET', `/api/ssw/tdc/Sandbox/${target.id}/Log`)
|
||
t.assert(log.code === 200, `运行日志接口可取数(code=${log.code})`)
|
||
} else {
|
||
t.log(' 当前任务未运行成功,跳过日志接口核对')
|
||
}
|
||
})
|
||
|
||
t.expectConsoleClean()
|
||
}
|