- 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).
39 lines
1.9 KiB
JavaScript
39 lines
1.9 KiB
JavaScript
/**
|
||
* TC-CONTRACT-015 · 正常办理合约创建
|
||
* REQ-012 [FL-5.2] 正向/场景法 P0
|
||
*
|
||
* 合约的业务必填项不止「标识/名称/双方机构」:后端 beforeSave 还强校验
|
||
* spaceId / productId / providerConnectorId / consumerConnectorId / purpose,
|
||
* 且提供方与使用方连接器不能是同一个。
|
||
* 这几个外键在表单里都是下拉(早先是让人手抄 UUID 的文本框),按位置取即可。
|
||
*/
|
||
export const meta = { tc: 'TC-CONTRACT-015', 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 code = t.uid('CT-CRT')
|
||
|
||
await t.openCreate()
|
||
await t.fillField('合约标识', code)
|
||
await t.fillField('合约名称', `${code} 合约创建烟测`)
|
||
const product = await t.pickOption('关联数据产品', 0)
|
||
const provider = await t.pickOption('提供方连接器', 0)
|
||
const consumer = await t.pickOption('使用方连接器', 1)
|
||
t.assert(!!product, `已关联数据产品「${product}」`)
|
||
t.assert(provider !== consumer, `提供方「${provider}」与使用方「${consumer}」是两个不同连接器`)
|
||
await t.fillField('提供方', '尚数网-提供方')
|
||
await t.fillField('使用方', '尚数网-使用方')
|
||
await t.fillField('数据使用目的', '联合建模烟测')
|
||
await t.save()
|
||
await t.expectToast('新增成功')
|
||
await t.waitIdle()
|
||
|
||
await t.search(code)
|
||
await t.expectRow(code)
|
||
const list = await t.apiList('/api/ssw/tds/Contract', { keyword: code })
|
||
t.assert(list.length >= 1 && list[0].contractCode === code, `落库合约标识一致:${list[0]?.contractCode}`)
|
||
t.assert(!!list[0]?.productId, `合约已关联数据产品(productId=${list[0]?.productId})`)
|
||
t.assert(list[0]?.providerConnectorId !== list[0]?.consumerConnectorId, '落库的提供方与使用方连接器不同')
|
||
}
|