This commit is contained in:
2026-09-11 11:15:04 +08:00
parent f702a819fa
commit 23e991722c
8 changed files with 115 additions and 29 deletions
+4 -2
View File
@@ -93,10 +93,12 @@ describe('RolesView', () => {
vi.mocked(createPlatformRole).mockReset()
})
it('keeps directory, menu, and action permissions independently checkable', () => {
it('links menu groups and permissions so partial selections use the half-checked state', () => {
const wrapper = mountView()
expect(wrapper.get('[data-testid="permission-tree"]').attributes('data-check-strictly')).toBe('true')
expect(wrapper.get('[data-testid="permission-tree"]').attributes('data-check-strictly')).toBe('false')
expect(rolesSource).not.toContain('check-strictly')
expect(rolesSource).not.toContain("disabled: 'disabled'")
})
it('shows the role code in the default list layout', () => {