Files
ssw-mvp/docs/e2e/cases/TC-CONTRACT-009.mjs
T
admin 4585d15d5f chore: snapshot source work — e2e fixes, backend/web, docs
- e2e: fix 9 failing cases (contract/hosting/delivery/usage/security);
  add dsl.createSandboxTask() self-provision helper; cli/runner now
  default headless, --ob opens visible browser
- backend: tdc/tds controller adjustments (delivery, hosting, contract,
  chain-evidence, catalog, product, policy-conflict, etc.)
- web: ssw views/components adjustments (contract, product, hosting, connector)
- docs: AGENTS.md, e2e README; .gitignore; project memory update

Excludes docs/e2e/results artifacts (screenshots + results.json).
2026-08-06 14:02:07 +08:00

23 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-009 · 查看合约签署的办理结果
* REQ-012 [FL-5.2] 反向/错误推测 P1
*/
export const meta = { tc: 'TC-CONTRACT-009', 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')
const sp = await t.pickSpaceRef()
if (!sp) t.skip('本页没有空间可选,跳过')
// ContractManage 按当前空间过滤列表;apiList 不带 spaceId 会拿到全量,
// 选到的合约可能在另一个空间里 → 页面按空间过滤查不到 → 查询超时。
const list = await t.apiList('/api/ssw/tds/Contract', { spaceId: sp.id, pageSize: 20 })
if (!list.length) t.skip('当前空间下无合约,先完成一次签署')
const target = list.find((c) => c.status === '02') || list[0]
await t.search(target.contractCode)
await t.expectRow(target.contractCode)
await t.openEdit(target.contractCode)
const code = await t.drawer().locator('.ant-form-item:has(label:text-is("合约标识")) input').inputValue()
t.assert(code === target.contractCode, `详情回显合约标识一致(${code})`)
await t.cancelDrawer()
await t.shot('TC-CONTRACT-009-detail')
}