Files
ssw-mvp/docs/e2e/cases/TC-CONTRACT-017.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

21 lines
1.2 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-017 · 查看合约创建的办理结果
* REQ-012 [FL-5.2] 反向/错误推测 P1
*/
export const meta = { tc: 'TC-CONTRACT-017', 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 按当前空间过滤列表;不带 spaceId 会拉到别空间的合约,页面查不到。
const list = await t.apiList('/api/ssw/tds/Contract', { spaceId: sp.id, pageSize: 20 })
if (!list.length) t.skip('当前空间下暂无合约')
const target = list[0]
await t.waitIdle(); await t.search(target.contractCode); await t.waitIdle(); 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-017-detail')
}