Files
ssw-mvp/docs/e2e/cases/TC-CONTRACT-020.mjs
T
admin 3247e9fd15 init: ssw-mvp initial commit
- 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
2026-08-05 18:29:12 +08:00

22 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* TC-CONTRACT-020 · 正常办理合约履行
* REQ-012 [FL-5.2] 正向/场景法 P0
*
* 合约履行:发起变更并完成变更确认。
*/
export const meta = { tc: 'TC-CONTRACT-020', req: 'REQ-012', title: '正常办理合约履行', type: '正向/场景法', priority: 'P0', 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.status === '02')
if (!target) t.skip('库中无生效合约,先做一次双签')
// 走 change → ChangeConfirm 完整链路
const changeR = await t.api('PUT', `/api/ssw/tds/Contract/${target.id}/Change`, { reason: '履行-变更烟测' })
t.assert(changeR.code === 200, `变更发起:code=${changeR.code} msg=${changeR.msg || ''}`)
const confirmR = await t.api('PUT', `/api/ssw/tds/Contract/${target.id}/ChangeConfirm`, {})
t.assert(confirmR.code === 200, `变更确认:code=${confirmR.code} msg=${confirmR.msg || ''}`)
const after = await t.apiList('/api/ssw/tds/Contract', { keyword: target.contractCode })
t.assert(after[0].version >= (target.version || 0) + 1, `合约版本号自增(${target.version || 0} → ${after[0].version})`)
}