feat: 新增数字员工管理页面与工作台首页重构
后端优化 agent 资产种子初始化和常量配置,前端新增数字员工 视图和调度对话框组件,重构个人工作台首页布局和洞察面板, 完善审计页面数字员工详情和运行时模型,优化侧边栏导航和图 标配置,新增工作台摘要和工作台数据模块,补充单元测试。
This commit is contained in:
33
web/tests/policies-view-table.test.mjs
Normal file
33
web/tests/policies-view-table.test.mjs
Normal file
@@ -0,0 +1,33 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const policiesViewPath = fileURLToPath(new URL('../src/views/PoliciesView.vue', import.meta.url))
|
||||
const policiesView = readFileSync(policiesViewPath, 'utf8')
|
||||
|
||||
function testIngestTimeUsesDedicatedColumn() {
|
||||
assert.match(
|
||||
policiesView,
|
||||
/<th>状态<\/th>\s*<th>归纳时间<\/th>\s*<th>上传人<\/th>/,
|
||||
'知识库文件表需要在状态和上传人之间单独展示归纳时间列'
|
||||
)
|
||||
assert.match(
|
||||
policiesView,
|
||||
/<td>\s*<div class="state-cell">\s*<span class="state-tag"[^>]*>\{\{ doc\.state \}\}<\/span>\s*<\/div>\s*<\/td>\s*<td class="ingest-time-cell">\{\{ doc\.ingestTime \|\| '—' \}\}<\/td>/,
|
||||
'状态列只展示状态标签,归纳时间需要放到独立单元格'
|
||||
)
|
||||
assert.doesNotMatch(
|
||||
policiesView,
|
||||
/class="state-time"|归纳时间:\{\{ doc\.ingestTime \}\}/,
|
||||
'状态单元格下面不应再显示归纳时间'
|
||||
)
|
||||
assert.doesNotMatch(policiesView, /colspan="7"/)
|
||||
assert.match(policiesView, /colspan="8"/)
|
||||
}
|
||||
|
||||
function run() {
|
||||
testIngestTimeUsesDedicatedColumn()
|
||||
console.log('policies view table tests passed')
|
||||
}
|
||||
|
||||
run()
|
||||
Reference in New Issue
Block a user