- 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
66 lines
2.4 KiB
JavaScript
66 lines
2.4 KiB
JavaScript
/**
|
||
* TC-CONTRACT-003 · 查看策略模板的办理结果
|
||
* REQ-011 [FL-5.1] 反向/错误推测 P1
|
||
*
|
||
* 前置:1. 已完成一次策略模板操作
|
||
* 2. 用户有查看记录的权限
|
||
* 步骤:1. 打开服务平台的【数字合约管理】
|
||
* 2. 查询刚办理的记录
|
||
* 3. 查看详情和相关记录
|
||
* 预期:能查到正确的策略模板结果,列表、详情和相关记录一致。
|
||
*
|
||
* 注:本用例对应【使用控制策略】模板页(/tds/policies)。
|
||
*/
|
||
export const meta = {
|
||
tc: 'TC-CONTRACT-003',
|
||
req: 'REQ-011',
|
||
title: '查看策略模板的办理结果',
|
||
type: '反向/错误推测',
|
||
priority: 'P1',
|
||
route: '/tds/policies',
|
||
needs: ['fe', 'be']
|
||
}
|
||
|
||
export async function run(t) {
|
||
let target = null
|
||
|
||
await t.step('前置:取一条已新建的策略模板作为查看对象', async () => {
|
||
await t.login()
|
||
const list = await t.apiList('/api/ssw/tds/PolicyTemplate', { pageSize: 50 })
|
||
if (!list.length) t.skip('库中没有任何策略模板,请先执行 TC-CONTRACT-001 完成一次新建')
|
||
target = list[0]
|
||
t.assert(true, `选定查看对象:${target.templateCode} / ${target.name}`)
|
||
})
|
||
|
||
await t.step('打开【使用控制策略】并查询该记录', async () => {
|
||
await t.goto('/tds/policies')
|
||
await t.search(target.templateCode)
|
||
await t.expectRow(target.templateCode)
|
||
await t.shot('查询结果')
|
||
})
|
||
|
||
await t.step('核对列表展示与后端记录一致', async () => {
|
||
const table = await t.readTable()
|
||
const row = table.find((cells) => cells.some((c) => c.includes(target.templateCode)))
|
||
t.assert(!!row, '查询结果命中目标记录')
|
||
t.assert(row.some((c) => c.includes(target.name)), `列表中的策略名称与后端一致(${target.name})`)
|
||
})
|
||
|
||
await t.step('核对详情:编辑抽屉回显的数据与列表一致', async () => {
|
||
await t.openEdit(target.templateCode)
|
||
const code = await t
|
||
.drawer()
|
||
.locator('.ant-form-item:has(label:text-is("策略标识")) input')
|
||
.inputValue()
|
||
const name = await t
|
||
.drawer()
|
||
.locator('.ant-form-item:has(label:text-is("策略名称")) input')
|
||
.inputValue()
|
||
t.assert(code === target.templateCode, `详情策略标识一致(${code})`)
|
||
t.assert(name === target.name, `详情策略名称一致(${name})`)
|
||
await t.shot('详情回显')
|
||
await t.cancelDrawer()
|
||
})
|
||
|
||
t.expectConsoleClean()
|
||
} |