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

57 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-CONNECTOR-006 · 查看接入连接器审批的办理结果
* REQ-005 [FL-3.1~3.3] 反向/错误推测 P1
*
* 前置:已完成一次连接器审批 / 用户有查看记录的权限
* 步骤:打开【接入连接器管理】→ 查询刚审批的记录 → 查看详情和相关记录
* 预期:能查到正确的审批结果,列表、详情与审批意见一致
*/
export const meta = {
tc: 'TC-CONNECTOR-006',
req: 'REQ-005',
title: '查看接入连接器审批的办理结果',
type: '反向/错误推测',
priority: 'P1',
route: '/tds/connectors',
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/Connector', { pageSize: 50 })
const audited = list.find((r) => r.auditStatus === 'PASS' || r.auditStatus === 'REJECTED')
if (!audited) t.skip('库里没有已审批的连接器,请先跑 TC-CONNECTOR-004 完成一次审批')
target = audited
t.assert(true, `选定查看对象:${target.connectorCode} / auditStatus=${target.auditStatus}`)
})
await t.step('按审批状态筛选并查询', async () => {
await t.goto('/tds/connectors')
await t.selectFilter('审批', target.auditStatus === 'PASS' ? '通过' : '驳回')
await t.expectRow(target.connectorCode)
await t.shot('筛选结果')
})
await t.step('核对详情:编辑抽屉里的审批字段与后端一致', async () => {
await t.openEdit(target.connectorCode)
// 审批字段是 form:false,编辑抽屉里没有 input,但表格列里能读到 tag
await t.cancelDrawer()
// 直接调后端 info 与列表接口双向对照
const info = await t.api('GET', `/api/ssw/tds/Connector/${target.id}`)
t.assert(info.code === 200, `详情接口返回 code=200(实际 ${info.code})`)
t.assert(info.data.auditStatus === target.auditStatus, `详情 auditStatus 与列表一致(${info.data.auditStatus})`)
t.assert(info.data.name === target.name, `详情 name 与列表一致(${info.data.name})`)
t.assert(info.data.connectorCode === target.connectorCode, `详情 connectorCode 与列表一致`)
})
await t.step('查询审批意见是否被记录', async () => {
if (!target.auditOpinion) t.skip('该记录未填写审批意见,跳过本步')
const info = await t.api('GET', `/api/ssw/tds/Connector/${target.id}`)
t.assert(!!info.data.auditOpinion, `审批意见持久化(${info.data.auditOpinion})`)
})
t.expectConsoleClean()
}