20 lines
872 B
JavaScript
20 lines
872 B
JavaScript
const assert = require('node:assert/strict')
|
|||
|
|
const fs = require('node:fs')
|
||
|
|
const path = require('node:path')
|
||
|
|
|
||
|
|
const root = path.resolve(__dirname, '..')
|
||
|
|
const read = (file) => fs.readFileSync(path.join(root, file), 'utf8')
|
||
|
|
const workbench = read('src/pages/operator/OperatorWorkbenchPage.vue')
|
||
|
|
const notifications = read('src/pages/settings/NotificationsPage.vue')
|
||
|
|
|
||
|
|
assert.match(workbench, /待处理/)
|
||
|
|
assert.match(workbench, /进行中/)
|
||
|
|
assert.match(workbench, /已完成/)
|
||
|
|
assert.match(workbench, /active|assigned|in_service|completed/)
|
||
|
|
assert.match(workbench, /注册演示用户|创建演示用户/)
|
||
|
|
assert.match(notifications, /matchmaker|appointment|counseling|premarital|review|account|activity|match|system/)
|
||
|
|
assert.match(notifications, /businessId|businessType/)
|
||
|
|
assert.match(notifications, /router\.(push|replace)/)
|
||
|
|
|
||
|
|
console.log('PASS: demo flow UI contract')
|