完成员工亲属资产前端实施
This commit is contained in:
38
ruoyi-ui/tests/unit/staff-family-asset-submit-flow.test.js
Normal file
38
ruoyi-ui/tests/unit/staff-family-asset-submit-flow.test.js
Normal file
@@ -0,0 +1,38 @@
|
||||
const assert = require("assert");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
const componentPath = path.resolve(
|
||||
__dirname,
|
||||
"../../src/views/ccdiStaffFmyRelation/index.vue"
|
||||
);
|
||||
const source = fs.readFileSync(componentPath, "utf8");
|
||||
|
||||
[
|
||||
"assetInfoList: []",
|
||||
"normalizeAssetInfoList()",
|
||||
"response.data.assetInfoList || []",
|
||||
"this.form.assetInfoList = this.normalizeAssetInfoList();",
|
||||
"this.form.assetInfoList.push(this.createEmptyAssetRow());",
|
||||
"relationCertType: null",
|
||||
"relationCertNo: null",
|
||||
].forEach((token) => {
|
||||
assert(
|
||||
source.includes(token),
|
||||
`亲属资产提交流程缺少关键处理: ${token}`
|
||||
);
|
||||
});
|
||||
|
||||
[
|
||||
"delete payload.assetInfoList[index].familyId",
|
||||
"delete payload.assetInfoList[index].personId",
|
||||
"delete asset.familyId",
|
||||
"delete asset.personId",
|
||||
].forEach((token) => {
|
||||
assert(
|
||||
source.includes(token),
|
||||
`提交前需要清理归属字段: ${token}`
|
||||
);
|
||||
});
|
||||
|
||||
console.log("staff-family-asset-submit-flow test passed");
|
||||
Reference in New Issue
Block a user