- 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
41 lines
1.3 KiB
JavaScript
41 lines
1.3 KiB
JavaScript
/**
|
||
* TC-REL-005 · 错误操作有正确提示
|
||
* REQ-Q-REL 质量特性-可靠性 正向 P0
|
||
*
|
||
* 前置:1. 已登录系统 2. 具有相应操作权限
|
||
* 步骤:1. 执行错误操作 2. 查看提示信息
|
||
* 预期:1. 对错误操作给出正确、明确的提示
|
||
*/
|
||
export const meta = {
|
||
tc: 'TC-REL-005',
|
||
req: 'Q-REL',
|
||
title: '错误操作有正确提示',
|
||
type: '正向',
|
||
priority: 'P0',
|
||
route: '/tds/connectors',
|
||
needs: ['fe', 'be']
|
||
}
|
||
|
||
export async function run(t) {
|
||
await t.step('前置:登录并打开连接器管理', async () => {
|
||
await t.login()
|
||
await t.goto('/tds/connectors')
|
||
})
|
||
|
||
await t.step('不填必填项提交,应明确提示具体字段', async () => {
|
||
await t.openCreate()
|
||
await t.save()
|
||
const txt = await t.expectReject()
|
||
t.assert(/不能为空|必填|required/i.test(txt), `提示包含「不能为空/必填」字样(实际「${txt}」)`)
|
||
await t.shot('必填校验提示')
|
||
})
|
||
|
||
await t.step('后端明确报错:含字段名而非空 message', async () => {
|
||
const r = await t.api('POST', '/api/ssw/tds/Connector', {})
|
||
t.assert(r.code !== 200, `返回非 200(code=${r.code})`)
|
||
t.assert(!!(r.msg && r.msg.length > 0), `错误信息非空(msg=${r.msg ?? ''})`)
|
||
await t.cancelDrawer()
|
||
})
|
||
|
||
t.expectConsoleClean()
|
||
} |