feat(phase-5): 后管京东数据库接口与页面+用户端采集入口——v1.4 Phase 5
This commit is contained in:
@@ -11,9 +11,9 @@ import {
|
||||
TOOL_MAP,
|
||||
} from '../src/pages/amazon/tool-catalog.ts'
|
||||
|
||||
test('工具目录:20 个工具 id 唯一且每个都有图标与渐变配色', () => {
|
||||
test('工具目录:21 个工具 id 唯一且每个都有图标与渐变配色', () => {
|
||||
const ids = TOOL_GROUPS.flatMap((g) => g.tools.map((t) => t.id))
|
||||
assert.equal(ids.length, 20, '工具总数应为 20(前端8 + 运营10 + 后勤2)')
|
||||
assert.equal(ids.length, 21, '工具总数应为 21(前端9 + 运营10 + 后勤2;v1.4 前端组加京东采集)')
|
||||
assert.equal(new Set(ids).size, ids.length, '工具 id 不应重复')
|
||||
for (const id of ids) {
|
||||
assert.ok(TOOL_ICON_SHAPES[id], `图标形状缺失: ${id}`)
|
||||
@@ -38,7 +38,7 @@ test('权限过滤:组键命中整组保留,未命中按工具权限过滤
|
||||
const frontOnly = filterGroupsByPermission(TOOL_GROUPS, ['brand_front_tools'])
|
||||
assert.equal(frontOnly.length, 1)
|
||||
assert.equal(frontOnly[0].key, 'front')
|
||||
assert.equal(frontOnly[0].tools.length, 8)
|
||||
assert.equal(frontOnly[0].tools.length, 9)
|
||||
|
||||
// 无组键时按单个工具权限过滤
|
||||
const partial = filterGroupsByPermission(TOOL_GROUPS, ['collect-data', 'publish'])
|
||||
|
||||
Reference in New Issue
Block a user