Files
ssw-mvp/docs/e2e/cases/TC-REL-005.mjs
T
admin 3247e9fd15 init: ssw-mvp initial commit
- 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
2026-08-05 18:29:12 +08:00

41 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-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()
}