mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-06 22:17:59 +00:00
In admin settings, this Pr will add the UI for managing custom roles ( ref: https://github.com/chatwoot/chatwoot/pull/9995 ). It also handles the routing logic changes to accommodate fine-tuned permissions. --------- Co-authored-by: Pranav <pranavrajs@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: iamsivin <iamsivin@gmail.com> Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
27 lines
639 B
JavaScript
27 lines
639 B
JavaScript
import { getters } from '../../customRole';
|
|
import { customRoleList } from './fixtures';
|
|
|
|
describe('#getters', () => {
|
|
it('getCustomRoles', () => {
|
|
const state = { records: customRoleList };
|
|
expect(getters.getCustomRoles(state)).toEqual(customRoleList);
|
|
});
|
|
|
|
it('getUIFlags', () => {
|
|
const state = {
|
|
uiFlags: {
|
|
fetchingList: true,
|
|
creatingItem: false,
|
|
updatingItem: false,
|
|
deletingItem: false,
|
|
},
|
|
};
|
|
expect(getters.getUIFlags(state)).toEqual({
|
|
fetchingList: true,
|
|
creatingItem: false,
|
|
updatingItem: false,
|
|
deletingItem: false,
|
|
});
|
|
});
|
|
});
|