证件额度按客户展示;Web 客户列表改用 toQueryParams,修复 buildQuery is not a function。 Co-authored-by: Cursor <cursoragent@cursor.com>
53 lines
1.8 KiB
TypeScript
53 lines
1.8 KiB
TypeScript
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/CustomerTab.vue', import.meta.url),
|
|
'utf8'
|
|
)
|
|
const planCertIndex = readFileSync(
|
|
new URL('../src/views/m/pl/plan-cert/index.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, /quotaStatisticsApi\.customers/)
|
|
assert.match(contractTab, /\/m\/pl\/plan-cert\/customer\//)
|
|
assert.match(contractTab, /暂无客户用证数据/)
|
|
assert.match(planCertIndex, /title: '客户用证'/)
|
|
})
|
|
|
|
test('H5 建档页使用关联购买证且无证面引用残留', () => {
|
|
assert.match(archiveForm, /关联购买证/)
|
|
assert.doesNotMatch(archiveForm, /证面引用/)
|
|
})
|
|
|
|
test('H5 段次只读卡展示同市只需购买证', () => {
|
|
assert.match(stopCard, /是否同市/)
|
|
assert.match(stopCard, /同市只需购买证/)
|
|
})
|