- 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
54 lines
2.5 KiB
JavaScript
54 lines
2.5 KiB
JavaScript
/**
|
||
* TC-SPACE-005 · 查看成员管理的办理结果
|
||
* REQ-015 [FL-2.3] 反向/错误推测 P1
|
||
*
|
||
* 前置:已完成一次成员管理操作 / 用户有查看记录的权限
|
||
* 步骤:打开【空间成员】→ 查询刚办理的记录 → 查看详情
|
||
* 预期:能查到正确的成员管理结果,列表、详情和相关记录一致
|
||
*/
|
||
export const meta = {
|
||
tc: 'TC-SPACE-005',
|
||
req: 'REQ-015',
|
||
title: '查看成员管理的办理结果',
|
||
type: '反向/错误推测',
|
||
priority: 'P1',
|
||
route: '/tds/space-members',
|
||
needs: ['fe', 'be']
|
||
}
|
||
|
||
export async function run(t) {
|
||
await t.login()
|
||
let target = null
|
||
|
||
await t.step('前置:取一条有过审批/退出动作的成员记录', async () => {
|
||
const list = await t.apiList('/api/ssw/tds/SpaceMember', { pageSize: 100 })
|
||
target = list.find((r) => (r.auditStatus === 'APPROVED' || r.auditStatus === 'REJECTED') && (r.joinTime || r.quitTime))
|
||
if (!target) target = list.find((r) => r.auditStatus === 'APPROVED' || r.auditStatus === 'REJECTED')
|
||
if (!target) t.skip('库中没有已审批/已驳回的成员记录,请先跑 TC-SPACE-003')
|
||
t.assert(true, `选定对象:${target.orgName} / auditStatus=${target.auditStatus} / status=${target.status}`)
|
||
})
|
||
|
||
await t.step('打开页面并按关键字检索', async () => {
|
||
await t.goto('/tds/space-members')
|
||
await t.search(target.orgName)
|
||
await t.expectRow(target.orgName)
|
||
await t.shot('查询结果')
|
||
})
|
||
|
||
await t.step('核对详情与列表一致', async () => {
|
||
const info = await t.api('GET', `/api/ssw/tds/SpaceMember/${target.id}`)
|
||
t.assert(info.code === 200, `详情接口 code=200(实际 ${info.code})`)
|
||
t.assert(info.data.orgName === target.orgName, `详情 orgName 与列表一致`)
|
||
t.assert(info.data.auditStatus === target.auditStatus, `详情 auditStatus 与列表一致(${info.data.auditStatus})`)
|
||
t.assert(info.data.status === target.status, `详情 status 与列表一致(${info.data.status})`)
|
||
if (target.joinTime) t.assert(!!info.data.joinTime, `joinTime 已持久化(${info.data.joinTime})`)
|
||
if (target.quitTime) t.assert(!!info.data.quitTime, `quitTime 已持久化(${info.data.quitTime})`)
|
||
})
|
||
|
||
await t.step('核对空间统计接口反映了成员数量', async () => {
|
||
const list = await t.apiList('/api/ssw/tds/SpaceMember', { spaceId: target.spaceId })
|
||
t.assert(list.length >= 1, `该空间至少有一条成员(实际 ${list.length})`)
|
||
})
|
||
|
||
t.expectConsoleClean()
|
||
} |