This commit is contained in:
2026-07-30 21:23:06 +08:00
parent 4e24d381c2
commit 4cef53e842
23 changed files with 493 additions and 54 deletions
+3 -1
View File
@@ -50,6 +50,8 @@ test('protects built-in roles and exposes role permission assignment', () => {
assert.match(storeSource, /if \(role\.builtin\) throw new Error\('内置角色不能删除'\)/)
assert.match(storeSource, /if \(members\.value\.some\(\(member\) => member\.roleIds\.includes\(id\)\)\)/)
assert.match(rolesSource, /store\.loadRoles\(\)/)
assert.match(rolesSource, /auth\.hasPermission\('company:member:list'\).*store\.loadMembers\(\)/)
assert.match(rolesSource, /await Promise\.all\(requests\)/)
assert.match(rolesSource, /await store\.createRole/)
})
@@ -67,7 +69,7 @@ test('implements grouped menu and action permission editing', () => {
assert.match(permissionsSource, /TENANT_PERMISSION_GROUPS/)
assert.match(permissionsSource, /function toggleGroup\(groupKey: string, checked: boolean\)/)
assert.match(permissionsSource, /function savePermissions\(\)/)
assert.match(permissionsSource, /内置角色,始终拥有全部客户工作台权限/)
assert.match(permissionsSource, /系统内置角色,权限由平台统一维护,不允许修改/)
assert.match(permissionsSource, /全量替换/)
assert.match(permissionsSource, /await store\.setRolePermissions/)
assert.doesNotMatch(permissionsSource, /当前只读展示权限资源/)