fix(pl): 对齐移动 H5 证书齐备 2.0 与合同用证提示。
H5 齐备页补齐待完善/完善并关闭,修正会误导归档可跳过额度的文案;合同用证增加新规则只读说明,并补相关单测。
This commit is contained in:
1 parent
9f855423d8
commit
c5ae2d957c
4 files changed
+219
-21
No files matched your search
@@ -0,0 +1,46 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import test from 'node:test'
|
||||
|
||||
const readyTab = readFileSync(
|
||||
new URL('../src/views/m/pl/plan-cert/ReadyTab.vue', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
const contractTab = readFileSync(
|
||||
new URL('../src/views/m/pl/plan-cert/ContractTab.vue', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
const archiveForm = readFileSync(
|
||||
new URL('../src/views/m/pl/plan-cert/archive-form.vue', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
const stopCard = readFileSync(
|
||||
new URL('../src/views/m/pl/plan/PlanStopReadCard.vue', import.meta.url),
|
||||
'utf8'
|
||||
)
|
||||
|
||||
test('H5 证书齐备对齐 2.0:待完善列表与完善并关闭,且文案不宣称归档可跳过额度', () => {
|
||||
assert.match(readyTab, /listPendingFulfill/)
|
||||
assert.match(readyTab, /certReadyApi\.fulfill/)
|
||||
assert.match(readyTab, /fulfillBatch/)
|
||||
assert.match(readyTab, /已标记待完善/)
|
||||
assert.match(readyTab, /完善并关闭/)
|
||||
assert.match(readyTab, /归档前仍须/)
|
||||
assert.doesNotMatch(readyTab, /安排和归档时都不再校验/)
|
||||
assert.doesNotMatch(readyTab, /也不扣减额度/)
|
||||
})
|
||||
|
||||
test('H5 合同用证页对新规则给出只读提示', () => {
|
||||
assert.match(contractTab, /客户\+证用品类/)
|
||||
assert.match(contractTab, /仅供历史查看/)
|
||||
})
|
||||
|
||||
test('H5 建档页使用关联购买证且无证面引用残留', () => {
|
||||
assert.match(archiveForm, /关联购买证/)
|
||||
assert.doesNotMatch(archiveForm, /证面引用/)
|
||||
})
|
||||
|
||||
test('H5 段次只读卡展示同市只需购买证', () => {
|
||||
assert.match(stopCard, /是否同市/)
|
||||
assert.match(stopCard, /同市只需购买证/)
|
||||
})
|
||||
@@ -11,10 +11,14 @@ test('危化品证上传位于运输管理并复用现有 WebView 壳', async ()
|
||||
const { WORKBENCH_MODULES } = await import(`data:text/javascript,${encodeURIComponent(source)}`)
|
||||
const transport = WORKBENCH_MODULES.find((m) => m.key === 'pl')
|
||||
const entry = transport.menus.find((m) => m.code === 'pl-plan-cert-webview')
|
||||
assert.ok(entry, '运输管理缺少危化品证上传入口')
|
||||
assert.equal(entry.name, '危化品证上传')
|
||||
assert.ok(entry, '运输管理缺少运输证件管理入口')
|
||||
assert.equal(entry.name, '运输证件管理')
|
||||
assert.equal(entry.perms, 'mini:pl:plan-cert:list')
|
||||
assert.equal(entry.enabled, true)
|
||||
assert.ok(
|
||||
Array.isArray(entry.anyPerms) && entry.anyPerms.includes('mini:pl:quota-cert:list'),
|
||||
'入口应覆盖证件建档等子权限'
|
||||
)
|
||||
const api = await read('miniprogram/config/api.js')
|
||||
const ast = ts.createSourceFile('api.js', api, ts.ScriptTarget.Latest, true)
|
||||
let expression
|
||||
|
||||
Reference in new issue
Block a user