39 lines
989 B
JavaScript
39 lines
989 B
JavaScript
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");
|