- 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-010 · 重复办理合约签署时不会重复处理
|
||
* REQ-012 [FL-5.2] 反向/错误推测 P1
|
||
*/
|
||
export const meta = { tc: 'TC-CONTRACT-010', req: 'REQ-012', title: '重复办理合约签署时不会重复处理', type: '反向/错误推测', priority: 'P1', route: '/tds/contracts', needs: ['fe','be'] }
|
||
export async function run(t) {
|
||
await t.login()
|
||
await t.goto('/tds/contracts')
|
||
await t.pickSpace()
|
||
const list = await t.apiList('/api/ssw/tds/Contract')
|
||
const target = list.find((c) => c.providerSignTime && c.consumerSignTime && c.status === '02')
|
||
if (!target) t.skip('库中无已双签合约,先跑 TC-CONTRACT-007 完成一次双签')
|
||
// 行内不出现「提供方签署/使用方签署」按钮
|
||
const a = await t.hasRowAction(target.contractCode, '提供方签署')
|
||
const b = await t.hasRowAction(target.contractCode, '使用方签署')
|
||
t.assert(!a && !b, `已双签合约不应再出现签署按钮(提供方签署=${a}, 使用方签署=${b})`)
|
||
// 直接调后端签名接口应被拒
|
||
const r = await t.api('PUT', `/api/ssw/tds/Contract/${target.id}/Sign`, { role: 'PROVIDER', signature: 'duplicate' })
|
||
t.assert(r.code !== 200 || /已签|拒绝|重复/.test(r.msg || ''), `重复签署被拒:code=${r.code} msg=${r.msg || ''}`)
|
||
} |