- 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
20 lines
1.0 KiB
JavaScript
20 lines
1.0 KiB
JavaScript
/**
|
|
* TC-CONTRACT_API-007 · 条件不满足时不能办理合约备案(接口)
|
|
* REQ-012 [FL-5.2] 反向/等价类 P0
|
|
*/
|
|
export const meta = { tc: 'TC-CONTRACT_API-007', req: 'REQ-012', title: '条件不满足时不能办理合约备案', type: '反向/等价类', priority: 'P0', needs: ['be'] }
|
|
export async function run(t) {
|
|
await t.login()
|
|
const list = await t.apiList('/api/ssw/tds/Contract')
|
|
const nonEff = list.find((c) => c.status !== '02')
|
|
if (nonEff) {
|
|
const r = await t.api('PUT', `/api/ssw/tds/Contract/${nonEff.id}/Chain`, { chainTxHash: '0xabc' })
|
|
t.assert(r.code !== 200 || /状态|不允许/.test(r.msg || ''), `非生效合约备案被拒:code=${r.code} msg=${r.msg || ''}`)
|
|
}
|
|
// 缺 chainTxHash
|
|
const eff = list.find((c) => c.status === '02' && !c.chainTxHash)
|
|
if (eff) {
|
|
const r = await t.api('PUT', `/api/ssw/tds/Contract/${eff.id}/Chain`, {})
|
|
t.assert(r.code !== 200 || /不能为空|必填/.test(r.msg || ''), `空 chainTxHash 被拒:code=${r.code} msg=${r.msg || ''}`)
|
|
}
|
|
} |