- 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
75 lines
2.9 KiB
JavaScript
75 lines
2.9 KiB
JavaScript
/**
|
||
* TC-SPACE-001 · 正常办理配置修改(空间)
|
||
* REQ-014 [FL-2.1] 正向/场景法 P0
|
||
*
|
||
* 前置:具备权限的运营方 / 【可信数据空间管理】可打开 / 测试数据已备
|
||
* 步骤:打开【可信数据空间管理】→ 填写或选择正确的数据 → 提交 → 办理结果
|
||
* 预期:空间成功创建/上线,状态与记录正确
|
||
*/
|
||
export const meta = {
|
||
tc: 'TC-SPACE-001',
|
||
req: 'REQ-014',
|
||
title: '正常办理配置修改',
|
||
type: '正向/场景法',
|
||
priority: 'P0',
|
||
route: '/tds/spaces',
|
||
needs: ['fe', 'be']
|
||
}
|
||
|
||
export async function run(t) {
|
||
const code = t.uid('E2E-SP')
|
||
const name = `测评空间-${t.runId}`
|
||
|
||
await t.step('前置:登录并打开【可信数据空间管理】', async () => {
|
||
await t.login()
|
||
await t.goto('/tds/spaces')
|
||
await t.expectTitle('可信数据空间')
|
||
await t.expectVisible('.ant-table', '空间列表已渲染')
|
||
})
|
||
|
||
await t.step('新建:填写空间标识、名称、类型、加入方式等正确数据', async () => {
|
||
await t.openCreate()
|
||
// 抽屉很长,分两段填:先上半部分,再 scroll 进去填下半部分
|
||
await t.fillField('空间标识', code)
|
||
await t.fillField('空间名称', name)
|
||
// 抽屉内部滚动到"加入方式"那行(避免直接 click 不稳定)
|
||
await t.page.evaluate(() => {
|
||
const label = [...document.querySelectorAll('.ant-drawer-content label')].find(
|
||
(el) => el.textContent && el.textContent.trim().startsWith('加入方式')
|
||
)
|
||
if (label) label.scrollIntoView({ block: 'center' })
|
||
})
|
||
await t.page.waitForTimeout(150)
|
||
await t.fillField('加入方式', '审批')
|
||
await t.fillField('联系人', '测评联系人')
|
||
await t.save()
|
||
await t.waitIdle()
|
||
await t.shot('新建后列表')
|
||
})
|
||
|
||
await t.step('核对办理结果:列表可见且字段正确', async () => {
|
||
await t.search(code)
|
||
await t.expectRow(code)
|
||
await t.expectRow(name)
|
||
})
|
||
|
||
await t.step('核对落库记录:接口侧数据与界面一致', async () => {
|
||
const list = await t.apiList('/api/ssw/tds/Space', { keyword: code })
|
||
const row = list.find((r) => r.spaceCode === code)
|
||
t.assert(!!row, `后端已落库空间 ${code}`)
|
||
t.assert(row.name === name, `落库名称与提交一致(${row.name})`)
|
||
t.assert(row.status === 'DRAFT', `新建默认 DRAFT(实际 ${row.status})`)
|
||
})
|
||
|
||
await t.step('上线:DRAFT → RUNNING', async () => {
|
||
const row = (await t.apiList('/api/ssw/tds/Space', { keyword: code }))[0]
|
||
if (!row) t.skip('空间不存在,跳过上线')
|
||
await t.doAction(row.spaceCode, '上线')
|
||
await t.refresh()
|
||
const after = (await t.apiList('/api/ssw/tds/Space', { keyword: code }))[0]
|
||
t.assert(after.status === 'RUNNING', `上线后 status=RUNNING(实际 ${after.status})`)
|
||
t.assert(!!after.onlineTime, `记录了 onlineTime(${after.onlineTime})`)
|
||
})
|
||
|
||
t.expectConsoleClean()
|
||
} |