feat(qa): 数据源配置改为统一添加向导
build / build (push) Successful in 1m6s

一个「+ 添加数据源」入口、五步固定(类型→授权→范围→校验→保存),类型只换候选来源与授权说明,
版式与动作词一致;对内/对外不在此配置,仍只在来源与目录标注。钉钉两类复用既有登记与扫码会话路径。
This commit is contained in:
hermes
2026-10-26 17:36:59 +08:00
parent 020cae1228
commit 740f0e69ba
4 changed files with 468 additions and 7 deletions
+4 -3
View File
@@ -560,16 +560,17 @@ describe('SystemSettingsView 数据源配置的默认清单', () => {
// 三个非 PP 来源一个都不该渲染,也没有任何折叠开关。
for (const hidden of ['国内工业', 'ATOM知识库', '本地手工验收', '显示 AList', '折叠'])
expect(html).not.toContain(hidden)
expect(html).toContain('dws 导入(钉钉)')
// 统一入口:一个「+ 添加数据源」向导,不再有按类型分家的 dws 导入面板标题。
expect(html).toContain('+ 添加数据源')
expect(html).toContain('PP 导入')
expect(html).toContain('去掉来源</button>')
expect(html).toContain('端点与凭据')
// PP 来源的卡片操作照旧:改刷新周期、启停、看修订历史。
for (const kept of ['查看修订历史', '保存并启用调度', '停用来源', '自动刷新周期']) expect(html).toContain(kept)
for (const removed of ['+ 新增钉钉知识库', '文件格式筛选']) expect(html).not.toContain(removed)
// 文档工程师看不到 dws 导入面板与「去掉来源」:两者都是管理员动作。
// 文档工程师看不到添加向导与「去掉来源」:两者都是管理员动作。
const engineer = view('engineer')
expect(engineer).not.toContain('dws 导入(钉钉)')
expect(engineer).not.toContain('+ 添加数据源')
expect(engineer).not.toContain('去掉来源</button>')
expect(engineer).toContain('PP 导入')
})