- 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
73 lines
2.8 KiB
JavaScript
73 lines
2.8 KiB
JavaScript
/**
|
||
* TC-PLATFORM-001 · 正常办理数据产品封装
|
||
* REQ-036 [FL-10.1] 正向/场景法 P0
|
||
*
|
||
* 前置:1. 已绑定连接器的机构用户或已认证连接器
|
||
* 2. 【数据提供】或【数据使用】可以正常打开
|
||
* 3. 已准备好测试数据
|
||
* 步骤:1. 打开【数据提供】或【数据使用】
|
||
* 2. 按页面提示填写或选择正确的数据
|
||
* 3. 点击提交,查看办理结果
|
||
* 预期:数据产品封装办理成功,系统按要求完成处理,状态和记录正确。
|
||
*
|
||
* 注:「数据产品封装」对应 /tdc/products 产品发布页(TDC Product)。
|
||
* 必填项:产品标识 / 产品名称 / 资源 ID。其它字段可走 defaults(API/FREE/DRAFT)。
|
||
*/
|
||
export const meta = {
|
||
tc: 'TC-PLATFORM-001',
|
||
req: 'REQ-036',
|
||
title: '正常办理数据产品封装',
|
||
type: '正向/场景法',
|
||
priority: 'P0',
|
||
route: '/tdc/products',
|
||
needs: ['fe', 'be']
|
||
}
|
||
|
||
export async function run(t) {
|
||
let resource = null
|
||
const code = `E2E-PLAT-${t.runId}`
|
||
const name = `测评数据产品-${t.runId}`
|
||
|
||
await t.step('前置:登录并取一条数据资源用于绑定 product', async () => {
|
||
await t.login()
|
||
const list = await t.apiList('/api/ssw/tdc/Resource', { pageSize: 50 })
|
||
resource = list[0]
|
||
if (!resource) t.skip('库中没有数据资源,无法办理产品封装')
|
||
t.assert(true, `已就绪 resource=${resource.id} / ${resource.name ?? resource.resourceName ?? ''}`)
|
||
})
|
||
|
||
await t.step('打开【产品发布】并新建产品', async () => {
|
||
await t.goto('/tdc/products')
|
||
await t.expectTitle('产品发布')
|
||
await t.expectVisible('.ant-table', '产品列表已渲染')
|
||
await t.openCreate()
|
||
await t.fillForm({
|
||
产品标识: code,
|
||
产品名称: name,
|
||
'资源 ID': resource.id,
|
||
产品分类: '通用',
|
||
开放字段: 'id,name',
|
||
交付配置: '{"endpoint":"https://e2e.local"}',
|
||
脱敏规则: '{"phone":"MASK_MIDDLE"}',
|
||
行级过滤: '1=1',
|
||
'目标空间 ID': resource.spaceId ?? ''
|
||
})
|
||
await t.save()
|
||
await t.expectToast('新增成功')
|
||
await t.waitIdle()
|
||
await t.shot('新建产品后列表')
|
||
})
|
||
|
||
await t.step('核对办理结果:列表可见且后端落库', async () => {
|
||
await t.search(code)
|
||
await t.expectRow(code)
|
||
const list = await t.apiList('/api/ssw/tdc/Product', { keyword: code })
|
||
const row = list.find((r) => r.productCode === code)
|
||
t.assert(!!row, `后端已落库产品 ${code}`)
|
||
t.assert(row.resourceId === resource.id, `资源 ID 一致(${row.resourceId})`)
|
||
t.assert(row.publishStatus === 'DRAFT', `默认发布状态为 DRAFT(实际 ${row.publishStatus})`)
|
||
t.assert(row.status === 'ENABLED', `默认启用状态为 ENABLED(实际 ${row.status})`)
|
||
})
|
||
|
||
t.expectConsoleClean()
|
||
} |