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

53 lines
2.2 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-004 · 正常办理接入连接器审批
* REQ-005 [FL-3.1~3.3] 正向/场景法 P0
*
* 前置:具备权限的平台运营方 / 【接入连接器管理】可打开 / 已有处于 PENDING 的连接器
* 步骤:打开【接入连接器管理】→ 选 PENDING 记录 → 点「通过」→ 填写审批意见 → 确认
* 预期:审批成功,状态从 PENDING 变为 PASS,状态与记录正确
*/
export const meta = {
tc: 'TC-CONNECTOR-004',
req: 'REQ-005',
title: '正常办理接入连接器审批',
type: '正向/场景法',
priority: 'P0',
route: '/tds/connectors',
needs: ['fe', 'be']
}
export async function run(t) {
let target = null
await t.step('前置:登录并挑选一条 PENDING/DRAFT 的连接器', async () => {
await t.login()
const list = await t.apiList('/api/ssw/tds/Connector', { pageSize: 50 })
const pending = list.find((r) => r.auditStatus === 'PENDING' || r.auditStatus === 'DRAFT')
if (!pending) t.skip('库里没有待审批的连接器,请先跑 TC-CONNECTOR-001 准备数据')
target = pending
t.assert(true, `选定审批对象:${target.connectorCode} / ${target.name} / auditStatus=${target.auditStatus}`)
})
await t.step('打开【接入连接器管理】并定位该记录', async () => {
await t.goto('/tds/connectors')
await t.search(target.connectorCode)
await t.expectRow(target.connectorCode)
})
await t.step('点「通过」并填写审批意见', async () => {
await t.doAction(target.connectorCode, '通过', `审批通过-${t.runId}`)
await t.waitIdle()
})
await t.step('核对界面与后端状态已变为 PASS', async () => {
await t.search(target.connectorCode)
await t.refresh()
const list = await t.apiList('/api/ssw/tds/Connector', { keyword: target.connectorCode })
const row = list.find((r) => r.connectorCode === target.connectorCode)
t.assert(row.auditStatus === 'PASS', `审批状态由 ${target.auditStatus} 变为 PASS(实际 ${row.auditStatus})`)
t.assert(!!row.auditTime, `记录了审批时间(${row.auditTime})`)
t.assert(!!row.auditOpinion && row.auditOpinion.includes(t.runId), `审批意见已写入记录(${row.auditOpinion})`)
})
t.expectConsoleClean()
}