This commit is contained in:
wkc
2026-07-02 16:48:17 +08:00
parent 979ed9669f
commit 87fb6443e6
27 changed files with 2167 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
const assert = require("assert");
const fs = require("fs");
const path = require("path");
const indexPath = path.resolve(__dirname, "../../src/views/ccdiProject/index.vue");
const indexSource = fs.readFileSync(indexPath, "utf8");
assert(
indexSource.includes("handleSubmitProject(data)"),
"项目创建成功回调应接收创建接口返回的数据"
);
assert(
indexSource.includes("path: `/ccdiProject/detail/${data.projectId}`"),
"项目创建成功后应跳转到新项目详情页"
);
assert(
indexSource.includes('query: { tab: "upload" }') ||
indexSource.includes("query: { tab: 'upload' }"),
"项目创建成功后应显式激活上传数据页签"
);
assert(
!/handleSubmitProject\(data\)\s*\{[\s\S]*?this\.getList\(\)\s*\/\/ 刷新列表[\s\S]*?\}/.test(indexSource),
"项目创建成功后不应只刷新列表"
);
console.log("project-create-upload-jump test passed");