接通历史项目导入前端提交链路
This commit is contained in:
@@ -206,11 +206,13 @@ export default {
|
||||
this.importDialogVisible = false;
|
||||
},
|
||||
/** 提交导入 */
|
||||
handleSubmitImport(data) {
|
||||
console.log("导入历史项目:", data);
|
||||
this.$modal.msgSuccess("项目导入成功");
|
||||
handleSubmitImport(project) {
|
||||
this.$modal.msgSuccess("历史项目导入任务已开始");
|
||||
this.importDialogVisible = false;
|
||||
this.getList();
|
||||
this.$router.push({
|
||||
path: `/ccdiProject/detail/${project.projectId}`,
|
||||
});
|
||||
},
|
||||
/** 创建季度初核 */
|
||||
handleCreateQuarterly() {
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
const assert = require("assert");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
const apiPath = path.resolve(__dirname, "../../src/api/ccdiProject.js");
|
||||
const indexPath = path.resolve(__dirname, "../../src/views/ccdiProject/index.vue");
|
||||
|
||||
const apiSource = fs.readFileSync(apiPath, "utf8");
|
||||
const indexSource = fs.readFileSync(indexPath, "utf8");
|
||||
|
||||
assert(apiSource.includes("url: '/ccdi/project/history'"), "应接通历史项目列表真实接口");
|
||||
assert(apiSource.includes("url: '/ccdi/project/import'"), "应接通历史项目导入真实接口");
|
||||
assert(indexSource.includes("this.$router.push({"), "导入成功后应跳转到详情页");
|
||||
assert(
|
||||
indexSource.includes("path: `/ccdiProject/detail/${project.projectId}`")
|
||||
|| indexSource.includes("path: `/ccdiProject/detail/${data.projectId}`"),
|
||||
"导入成功后应跳转到新项目详情页"
|
||||
);
|
||||
assert(indexSource.includes("历史项目导入任务已开始"), "成功提示文案应说明历史导入任务已开始");
|
||||
|
||||
console.log("project-import-history-submit-flow test passed");
|
||||
Reference in New Issue
Block a user