实现员工资产维护前端功能
This commit is contained in:
29
ruoyi-ui/tests/unit/employee-asset-submit-flow.test.js
Normal file
29
ruoyi-ui/tests/unit/employee-asset-submit-flow.test.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const assert = require("assert");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
const componentPath = path.resolve(
|
||||
__dirname,
|
||||
"../../src/views/ccdiBaseStaff/index.vue"
|
||||
);
|
||||
const source = fs.readFileSync(componentPath, "utf8");
|
||||
|
||||
[
|
||||
"assetInfoList: []",
|
||||
"normalizeAssetInfoList()",
|
||||
"this.form.assetInfoList = [];",
|
||||
"response.data.assetInfoList || []",
|
||||
"this.form.assetInfoList = this.normalizeAssetInfoList();",
|
||||
"'form.idCard'(newIdCard, oldIdCard)",
|
||||
"syncAssetPersonIds(newIdCard, oldIdCard)",
|
||||
"this.form.assetInfoList.push(this.createEmptyAssetRow(this.form.idCard));",
|
||||
"personId: defaultPersonId || \"\"",
|
||||
"assetStatusOptions.some(option => option.value === asset.assetStatus)",
|
||||
].forEach((token) => {
|
||||
assert(
|
||||
source.includes(token),
|
||||
`员工资产提交流程缺少关键处理: ${token}`
|
||||
);
|
||||
});
|
||||
|
||||
console.log("employee-asset-submit-flow test passed");
|
||||
Reference in New Issue
Block a user