30 lines
899 B
JavaScript
30 lines
899 B
JavaScript
|
|
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");
|