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

52 lines
1.7 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-004 · 屏蔽用户误操作并提示
* REQ-Q-REL 质量特性-可靠性 正向 P0
*
* 前置:1. 已登录系统 2. 具有相应操作权限
* 步骤:1. 进行明显误操作 2. 观察系统响应
* 预期:1. 系统屏蔽误操作并给予友好提示
*/
export const meta = {
tc: 'TC-REL-004',
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.expectVisible('.ant-table', '列表页正常加载')
})
await t.step('误操作 1:缺必填项提交,应被校验拦截', async () => {
await t.openCreate()
await t.save()
await t.expectReject('不能为空')
t.assert(await t.drawer().isVisible(), '抽屉保持打开,未误提交')
await t.cancelDrawer()
})
await t.step('误操作 2:搜索超长关键字 / 特殊字符,应正常处理不报错', async () => {
await t.search("';DROP TABLE ssw_tds_connector;--" + 'X'.repeat(200))
await t.refresh()
await t.expectVisible('.ant-table', '搜索后表格仍正常渲染')
})
await t.step('误操作 3:直打后端 API 触发 500 路径不存在的端点', async () => {
const r = await t.api('GET', '/api/ssw/tds/Connector/__no_such_id__/detail')
t.assert(r.code !== 200, `异常路径被后端拒绝,未返回 200(code=${r.code})`)
})
await t.step('核对系统响应后仍可正常操作', async () => {
await t.resetQuery()
await t.refresh()
await t.expectVisible('.ant-table', '列表仍可刷新')
})
t.expectConsoleClean()
}