调整上传数据页轻改版前端实现
This commit is contained in:
@@ -9,70 +9,22 @@ const componentPath = path.resolve(
|
||||
const source = fs.readFileSync(componentPath, "utf8");
|
||||
|
||||
assert(
|
||||
/<div class="header-actions">[\s\S]*?@click="handleViewReport"[\s\S]*?>\s*查看报告\s*<\/el-button>[\s\S]*?@click="handleFetchBankInfo"[\s\S]*?>\s*拉取本行信息\s*<\/el-button>[\s\S]*?@click="handleOpenCreditUpload"[\s\S]*?>\s*征信导入\s*<\/el-button>/.test(
|
||||
/<div class="header-actions">[\s\S]*?@click="handleOpenBatchUploadDialog"[\s\S]*?>\s*上传流水\s*<\/el-button>[\s\S]*?@click="handleViewReport"[\s\S]*?>\s*查看报告\s*<\/el-button>[\s\S]*?@click="handleFetchBankInfo"[\s\S]*?>\s*拉取本行信息\s*<\/el-button>[\s\S]*?@click="handleGoCreditInfoPage"[\s\S]*?>\s*征信导入\s*<\/el-button>/.test(
|
||||
source
|
||||
),
|
||||
"页面右上角按钮顺序应为查看报告、拉取本行信息、征信导入"
|
||||
"页面右上角按钮顺序应为上传流水、查看报告、拉取本行信息、征信导入"
|
||||
);
|
||||
|
||||
assert(
|
||||
/<el-button[\s\S]*?:disabled="isReportDisabled"[\s\S]*?@click="handleViewReport"[\s\S]*?>\s*查看报告\s*<\/el-button>/.test(
|
||||
/<el-button[\s\S]*?type="primary"[\s\S]*?@click="handleOpenBatchUploadDialog"[\s\S]*?>\s*上传流水\s*<\/el-button>/.test(
|
||||
source
|
||||
),
|
||||
"查看报告按钮应绑定禁用状态"
|
||||
"上传流水按钮应为头部唯一主按钮"
|
||||
);
|
||||
|
||||
assert(
|
||||
/<el-button[\s\S]*?type="primary"[\s\S]*?@click="handleViewReport"[\s\S]*?>\s*查看报告\s*<\/el-button>/.test(
|
||||
source
|
||||
),
|
||||
"查看报告按钮应为重要按钮"
|
||||
);
|
||||
|
||||
assert(
|
||||
/<el-button[\s\S]*?@click="handleOpenCreditUpload"[\s\S]*?>\s*征信导入\s*<\/el-button>/.test(
|
||||
source
|
||||
) &&
|
||||
!/<el-button[\s\S]*?@click="handleOpenCreditUpload"[\s\S]*?type="primary"[\s\S]*?>\s*征信导入\s*<\/el-button>/.test(
|
||||
source
|
||||
),
|
||||
"征信导入按钮应为默认样式"
|
||||
);
|
||||
|
||||
assert(
|
||||
/isReportDisabled\(\)\s*\{[\s\S]*?\["0",\s*"3"\]\.includes\(String\(this\.projectInfo\.projectStatus\)\)/.test(
|
||||
source
|
||||
),
|
||||
"项目状态为进行中或打标中时应禁用查看报告"
|
||||
);
|
||||
|
||||
assert(
|
||||
/uploadCards:\s*\[[\s\S]*?key:\s*"transaction"[\s\S]*?btnText:\s*"上传流水"[\s\S]*?disabled:\s*false[\s\S]*?\],/.test(
|
||||
source
|
||||
),
|
||||
"上传卡片区应只保留流水导入卡片"
|
||||
);
|
||||
|
||||
assert(
|
||||
!/key:\s*"credit"/.test(source),
|
||||
"上传卡片区不应再保留征信导入卡片配置"
|
||||
);
|
||||
|
||||
assert(
|
||||
!/key:\s*"namelist"/.test(source),
|
||||
"上传卡片区不应再保留名单库选择卡片配置"
|
||||
);
|
||||
|
||||
assert(
|
||||
/\.upload-cards\s*\{[\s\S]*?justify-content:\s*center;/.test(source),
|
||||
"单张流水导入卡片应在上传区居中显示"
|
||||
);
|
||||
|
||||
assert(
|
||||
/\.upload-card\s*\{[\s\S]*?width:\s*420px;[\s\S]*?max-width:\s*100%;/.test(
|
||||
source
|
||||
),
|
||||
"流水导入卡片应加宽到 420px,并保持窄屏自适应"
|
||||
!/uploadCards:/.test(source) && !/class="upload-cards"/.test(source),
|
||||
"上传卡片数据和模板应已清理"
|
||||
);
|
||||
|
||||
console.log("upload-data-header-import-button test passed");
|
||||
|
||||
Reference in New Issue
Block a user