47 lines
1.6 KiB
TypeScript
47 lines
1.6 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/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, /同市只需购买证/)
|
|
})
|