- 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
27 lines
1.4 KiB
JavaScript
27 lines
1.4 KiB
JavaScript
/**
|
||
* TC-CONTRACT-021 · 条件不满足时不能办理合约履行
|
||
* REQ-012 [FL-5.2] 反向/等价类 P0
|
||
*/
|
||
export const meta = { tc: 'TC-CONTRACT-021', req: 'REQ-012', title: '条件不满足时不能办理合约履行', type: '反向/等价类', priority: 'P0', route: '/tds/contracts', 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}/Change`, { reason: '反例' })
|
||
t.assert(r.code !== 200 || /状态|拒绝|不允许/.test(r.msg || ''), `非生效合约变更被拒:code=${r.code} msg=${r.msg || ''}`)
|
||
}
|
||
// 终止后不能再变更(status=05/06)
|
||
const terminated = list.find((c) => ['05', '06'].includes(c.status))
|
||
if (terminated) {
|
||
const r = await t.api('PUT', `/api/ssw/tds/Contract/${terminated.id}/Change`, { reason: '反例2' })
|
||
t.assert(r.code !== 200, `已终止合约变更被拒:code=${r.code}`)
|
||
}
|
||
// 缺 reason
|
||
const eff = list.find((c) => c.status === '02')
|
||
if (eff) {
|
||
const r = await t.api('PUT', `/api/ssw/tds/Contract/${eff.id}/Change`, { reason: '' })
|
||
t.assert(r.code !== 200 || /不能为空|必填/.test(r.msg || ''), `空 reason 被拒:code=${r.code} msg=${r.msg || ''}`)
|
||
}
|
||
} |