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

24 lines
985 B
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-COMPAT-002 · 与其他系统交换信息
* Q-COMPAT 兼容性 · 正向 · P1
* 预期:能与其他系统进行数据交换,交换格式正确
*/
export const meta = {
tc: 'TC-COMPAT-002',
req: 'Q-COMPAT',
title: '与其他系统交换信息',
type: '正向',
priority: 'P1',
needs: ['be']
}
export async function run(t) {
// JSON over HTTP:这是与外部系统交换的事实标准
const list = await t.api('GET', '/api/ssw/tds/Space?currentPage=1&pageSize=1')
t.assert(list.code === 200, `外部接口返回 JSON ActionResult 格式 code=200(实际 ${list.code})`)
t.assert(typeof list.data === 'object', 'data 字段为对象(可被其他系统解析)')
// 数字合约订阅:飞梭链存证链路作为跨系统交换的证据
await t.login()
const evid = await t.apiList('/api/ssw/tds/ChainEvidence/List')
t.assert(Array.isArray(evid), `链上存证记录可对外暴露为 JSON 数组(当前 ${evid.length} 条)`)
}