优化
This commit is contained in:
@@ -8,6 +8,7 @@ const membersSource = fs.readFileSync(new URL('./MembersView.vue', import.meta.u
|
||||
const rolesSource = fs.readFileSync(new URL('./RolesView.vue', import.meta.url), 'utf8')
|
||||
const permissionsSource = fs.readFileSync(new URL('./PermissionsView.vue', import.meta.url), 'utf8')
|
||||
const storeSource = fs.readFileSync(new URL('../store/tenantAdministration.ts', import.meta.url), 'utf8')
|
||||
const apiSource = fs.readFileSync(new URL('../api/merchantIam.ts', import.meta.url), 'utf8')
|
||||
|
||||
test('routes tenant administration modules to implemented views instead of the placeholder', () => {
|
||||
assert.match(routerSource, /path: 'company\/profile'[\s\S]*?CompanyProfileView\.vue/)
|
||||
@@ -23,7 +24,7 @@ test('implements company details, contact information and qualification workflow
|
||||
assert.match(profileSource, /联系信息/)
|
||||
assert.match(profileSource, /资质文件/)
|
||||
assert.match(profileSource, /async function saveProfile\(\)/)
|
||||
assert.match(profileSource, /function submitQualification\(\)/)
|
||||
assert.match(profileSource, /function submitQualification\(closeDialog = true\)/)
|
||||
assert.match(profileSource, /validateQualificationFile/)
|
||||
assert.match(profileSource, /function removeSelectedFile\(type: MerchantQualificationType\)/)
|
||||
assert.match(profileSource, /qualificationSubmitting/)
|
||||
@@ -32,7 +33,9 @@ test('implements company details, contact information and qualification workflow
|
||||
assert.match(profileSource, /:key="`\$\{item\.value\}-\$\{item\.inputVersion\}`"/)
|
||||
assert.match(profileSource, /class="qualification-upload-grid"/)
|
||||
assert.match(profileSource, /v-for="item in qualificationDrafts"/)
|
||||
assert.match(profileSource, /保存全部资质/)
|
||||
assert.match(profileSource, /保存草稿/)
|
||||
assert.match(profileSource, /提交审核/)
|
||||
assert.match(profileSource, /async function submitQualificationAndReview\(\)/)
|
||||
assert.match(profileSource, /uploadMerchantRequiredQualificationPackage/)
|
||||
assert.match(profileSource, /const requiredPackageFilesSelected = computed/)
|
||||
assert.match(profileSource, /item\.uploadState = 'uploading'/)
|
||||
@@ -69,6 +72,8 @@ test('implements company details, contact information and qualification workflow
|
||||
assert.match(profileSource, /const requiredQualificationTypes = qualificationTypes\.filter\(\(type\) => type\.required\)/)
|
||||
assert.match(profileSource, /货代资质证书'.*required: false/)
|
||||
assert.match(profileSource, /法人身份证'.*required: false/)
|
||||
assert.match(profileSource, /accept="\.pdf,\.jpg,\.jpeg,\.png,\.bmp,application\/pdf,image\/jpeg,image\/png,image\/bmp,image\/x-ms-bmp"/)
|
||||
assert.match(profileSource, /支持 PDF、JPG、PNG、BMP/)
|
||||
assert.match(profileSource, /银行开户许可证'.*required: false/)
|
||||
assert.match(profileSource, /requiredQualificationTypes\.every/)
|
||||
assert.doesNotMatch(profileSource, /四类必填资质/)
|
||||
@@ -79,6 +84,17 @@ test('implements company details, contact information and qualification workflow
|
||||
assert.match(profileSource, /法人身份证已保存,尚未提交审核/)
|
||||
assert.match(profileSource, /qualificationUploadErrorMessage\(error\)/)
|
||||
assert.match(profileSource, /submitTenantQualificationReview/)
|
||||
assert.match(apiSource, /function deleteTenantQualification\(qualificationId: number \| string\)/)
|
||||
assert.match(apiSource, /method: 'DELETE'/)
|
||||
assert.match(apiSource, /`\/merchant\/v1\/iam\/tenant\/qualifications\/\$\{qualificationId\}`/)
|
||||
assert.match(profileSource, /function qualificationDeleteDisabled\(record: TenantQualification\)/)
|
||||
assert.match(profileSource, /!canUploadQualification\.value/)
|
||||
assert.match(profileSource, /store\.deleteQualification\(record\.id\)/)
|
||||
assert.match(profileSource, /资质文件已删除/)
|
||||
assert.match(profileSource, /:disabled="qualificationDeleteDisabled\(row as TenantQualification\)"/)
|
||||
assert.match(profileSource, /:disabled="qualificationDeleteDisabled\(record\)"/)
|
||||
assert.match(storeSource, /originalFileName\?\.trim\(\) \|\| '—'/)
|
||||
assert.match(storeSource, /formatQualificationUpdatedAt\(item\.updatedAt\)/)
|
||||
assert.match(profileSource, /提交企业审核/)
|
||||
assert.match(profileSource, /资质文件已保存,尚未提交审核/)
|
||||
assert.match(profileSource, /资质文件已保存,但最新状态刷新失败/)
|
||||
@@ -105,6 +121,8 @@ test('implements company details, contact information and qualification workflow
|
||||
assert.match(profileSource, /pattern: \/\^\[0-9-\]\{4,32\}\$\//)
|
||||
assert.doesNotMatch(profileSource, /<dt>联系电话<\/dt><dd>\{\{ store\.company\.contactPhone/)
|
||||
assert.match(storeSource, /expiresAt: item\.validTo \|\| '长期有效'/)
|
||||
assert.match(storeSource, /fileName: item\.originalFileName\?\.trim\(\) \|\| '—'/)
|
||||
assert.match(storeSource, /updatedAt: formatQualificationUpdatedAt\(item\.updatedAt\)/)
|
||||
})
|
||||
|
||||
test('implements member list, role assignment, password reset and status control', () => {
|
||||
|
||||
Reference in New Issue
Block a user