- 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.3 KiB
JavaScript
20 lines
1.3 KiB
JavaScript
/**
|
|
* TC-CONTRACT_API-013 · 重复办理数字合约签订时不会重复处理(接口)
|
|
* REQ-012 [FL-5.2] 反向/错误推测 P1
|
|
*/
|
|
export const meta = { tc: 'TC-CONTRACT_API-013', req: 'REQ-012', title: '重复办理数字合约签订时不会重复处理', type: '反向/错误推测', priority: 'P1', needs: ['be'] }
|
|
export async function run(t) {
|
|
await t.login()
|
|
const list = await t.apiList('/api/ssw/tds/Contract')
|
|
const pending = list.find((c) => c.status === '01' && !c.providerSigned)
|
|
if (!pending) {
|
|
t.skip('无未签署(待提供方签)的合约;批量顺序执行下 01 合约可能已被前置用例签完,属测试数据隔离限制')
|
|
}
|
|
const r1 = await t.api('PUT', `/api/ssw/tds/Contract/${pending.id}/Sign`, { role: 'PROVIDER', signature: 'first' })
|
|
if (r1.code !== 200) {
|
|
if (/已签|重复|存在/.test(r1.msg || '')) { t.skip(`该合约已被签(${r1.msg}),跳过(批量执行状态污染)`); return }
|
|
t.assert(false, `首次提供方签:code=${r1.code} msg=${r1.msg}`)
|
|
}
|
|
const r2 = await t.api('PUT', `/api/ssw/tds/Contract/${pending.id}/Sign`, { role: 'PROVIDER', signature: 'second' })
|
|
t.assert(r2.code !== 200 || /已签|重复/.test(r2.msg || ''), `同一 side 重复签被拒:code=${r2.code} msg=${r2.msg || ''}`)
|
|
} |