完成历史项目导入前端闭环
This commit is contained in:
@@ -78,3 +78,9 @@
|
|||||||
- 将 `uploadFileActionRules.js` 改为按整行判断动作,对 `sourceType = HISTORY_IMPORT` 的记录直接返回 `null`,隐藏删除入口
|
- 将 `uploadFileActionRules.js` 改为按整行判断动作,对 `sourceType = HISTORY_IMPORT` 的记录直接返回 `null`,隐藏删除入口
|
||||||
- 新增 `upload-data-history-import-readonly.test.js`,并扩展现有文件列表与删除文案测试,锁定来源字段与历史导入只读规则
|
- 新增 `upload-data-history-import-readonly.test.js`,并扩展现有文件列表与删除文案测试,锁定来源字段与历史导入只读规则
|
||||||
- 验证命令:`cd ruoyi-ui && node tests/unit/upload-data-file-list-table.test.js && node tests/unit/upload-data-delete-retag-copy.test.js && node tests/unit/upload-data-history-import-readonly.test.js`
|
- 验证命令:`cd ruoyi-ui && node tests/unit/upload-data-file-list-table.test.js && node tests/unit/upload-data-delete-retag-copy.test.js && node tests/unit/upload-data-history-import-readonly.test.js`
|
||||||
|
|
||||||
|
### 2026-03-29 Task 4 前端校验与详情页收口验证
|
||||||
|
|
||||||
|
- 扩展 `project-import-history-dialog-behavior.test.js`,补齐“请选择历史项目”“请输入新项目名称”两条关键校验文案断言,锁定导入弹窗最小交互约束
|
||||||
|
- 扩展 `project-detail-tagging-polling.test.js`,补齐 `this.$route.params.projectId` 与 `projectStatusPolling` 代码痕迹断言,确认新项目详情页继续以路由参数承接并保留状态轮询能力
|
||||||
|
- 完成前端回归验证:`cd ruoyi-ui && node tests/unit/project-import-history-submit-flow.test.js && node tests/unit/project-import-history-dialog-layout.test.js && node tests/unit/project-import-history-dialog-behavior.test.js && node tests/unit/upload-data-file-list-table.test.js && node tests/unit/upload-data-delete-retag-copy.test.js && node tests/unit/upload-data-history-import-readonly.test.js && node tests/unit/project-detail-tagging-polling.test.js`
|
||||||
|
|||||||
@@ -8,6 +8,16 @@ const componentPath = path.resolve(
|
|||||||
);
|
);
|
||||||
const source = fs.readFileSync(componentPath, "utf8");
|
const source = fs.readFileSync(componentPath, "utf8");
|
||||||
|
|
||||||
|
assert(
|
||||||
|
source.includes("this.$route.params.projectId"),
|
||||||
|
"详情页应直接使用路由参数作为项目标识来源"
|
||||||
|
);
|
||||||
|
|
||||||
|
assert(
|
||||||
|
source.includes("projectStatusPolling"),
|
||||||
|
"详情页应保留项目状态轮询相关实现"
|
||||||
|
);
|
||||||
|
|
||||||
assert(
|
assert(
|
||||||
/projectStatusPollingTimer:\s*null/.test(source),
|
/projectStatusPollingTimer:\s*null/.test(source),
|
||||||
"详情页应声明项目状态轮询定时器"
|
"详情页应声明项目状态轮询定时器"
|
||||||
|
|||||||
@@ -8,5 +8,7 @@ const source = fs.readFileSync(dialogPath, "utf8");
|
|||||||
assert(source.includes("listHistoryProjects("), "应通过真实历史项目接口加载数据");
|
assert(source.includes("listHistoryProjects("), "应通过真实历史项目接口加载数据");
|
||||||
assert(source.includes("importFromHistory("), "应通过真实导入接口提交");
|
assert(source.includes("importFromHistory("), "应通过真实导入接口提交");
|
||||||
assert(source.includes("this.$emit('submit', response.data)"), "提交成功后应向父组件返回新项目数据");
|
assert(source.includes("this.$emit('submit', response.data)"), "提交成功后应向父组件返回新项目数据");
|
||||||
|
assert(source.includes("请选择历史项目"), "未选择历史项目时应提示用户先选择来源项目");
|
||||||
|
assert(source.includes("请输入新项目名称"), "未填写新项目名称时应展示必填校验文案");
|
||||||
|
|
||||||
console.log("project-import-history-dialog-behavior test passed");
|
console.log("project-import-history-dialog-behavior test passed");
|
||||||
|
|||||||
Reference in New Issue
Block a user