- 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.5 KiB
JavaScript
75 lines
2.5 KiB
JavaScript
/**
|
|
* TC-IDENTITY-014 · 条件不满足时不能办理连接器身份管理
|
|
* REQ-031 [FL-8.2] 反向/等价类 P0
|
|
*
|
|
* 前置:连接器的【身份管理】可打开 / 已准备无权限账号或错误数据
|
|
* 步骤:打开连接器的【身份管理】→ 使用无权限账号或错误数据办理连接器身份管理 → 点击提交,查看提示与数据
|
|
* 预期:系统不允许办理连接器身份管理,并说明原因。原有数据和状态不变。
|
|
*
|
|
* 连接器身份的反向:CrudPage 新建表单必填缺失(identityCode/name/tdsEndpoint)应被业务校验拦截。
|
|
*/
|
|
export const meta = {
|
|
tc: 'TC-IDENTITY-014',
|
|
req: 'REQ-031',
|
|
title: '条件不满足时不能办理连接器身份管理',
|
|
type: '反向/等价类',
|
|
priority: 'P0',
|
|
route: '/tdc/identity',
|
|
needs: ['fe', 'be']
|
|
}
|
|
|
|
export async function run(t) {
|
|
let dirtyName = ''
|
|
|
|
await t.step('前置:登录并打开连接器身份管理', async () => {
|
|
await t.login()
|
|
await t.goto('/tdc/identity')
|
|
await t.expectTitle('连接器身份')
|
|
})
|
|
|
|
await t.step('缺必填项提交:只填身份名称留空其他关键字段,应被业务拒绝', async () => {
|
|
dirtyName = `非法身份-${t.uid('CONN')}`
|
|
await t.openCreate()
|
|
// 仅填一个名字,缺 identityCode / tdsEndpoint 等关键字段
|
|
await t.fillForm({ 身份名称: dirtyName })
|
|
await t.save()
|
|
await t.expectReject('不能为空')
|
|
await t.shot('缺必填拦截')
|
|
t.assert(
|
|
await t.drawer().isVisible(),
|
|
'校验未通过时抽屉保持打开,未误提交'
|
|
)
|
|
await t.cancelDrawer()
|
|
})
|
|
|
|
await t.step('提交相同 identityCode 两次:第二次应被业务拒绝', async () => {
|
|
const code = `E2E-IDENT-DUP-${t.uid('CONN').replace(/[^a-zA-Z0-9_-]/g, '').slice(-8)}`
|
|
await t.openCreate()
|
|
await t.fillForm({
|
|
身份标识: code,
|
|
身份名称: `第一条-${t.uid('CONN').replace(/[^a-zA-Z0-9_-]/g, '').slice(-8)}`,
|
|
'TDS 地址': 'https://tds.ssw.local'
|
|
})
|
|
await t.save()
|
|
await t.waitIdle()
|
|
await t.search(code)
|
|
await t.expectRow(code)
|
|
|
|
// 第二次提交同 identityCode
|
|
await t.openCreate()
|
|
await t.fillForm({
|
|
身份标识: code,
|
|
身份名称: `第二条-${t.uid('CONN').replace(/[^a-zA-Z0-9_-]/g, '').slice(-8)}`,
|
|
'TDS 地址': 'https://tds.ssw.local'
|
|
})
|
|
await t.save()
|
|
await t.expectReject('已存在')
|
|
await t.cancelDrawer()
|
|
})
|
|
|
|
await t.step('核对:脏数据未落库', async () => {
|
|
await t.search(dirtyName)
|
|
await t.expectNoRow(dirtyName)
|
|
})
|
|
}
|