feat: Add inbox view page (#8814)
* feat: Add inbox view page * Update accounts.js * Update index.js
This commit is contained in:
@@ -4,6 +4,10 @@ const accountData = {
|
||||
id: 1,
|
||||
name: 'Company one',
|
||||
locale: 'en',
|
||||
features: {
|
||||
auto_resolve_conversations: false,
|
||||
agent_management: false,
|
||||
},
|
||||
};
|
||||
|
||||
describe('#getters', () => {
|
||||
@@ -29,4 +33,32 @@ describe('#getters', () => {
|
||||
isDeleting: false,
|
||||
});
|
||||
});
|
||||
|
||||
it('isFeatureEnabledonAccount', () => {
|
||||
const state = {
|
||||
records: [accountData],
|
||||
};
|
||||
const rootGetters = {
|
||||
getCurrentUser: {
|
||||
type: 'SuperAdmin',
|
||||
},
|
||||
};
|
||||
expect(
|
||||
getters.isFeatureEnabledonAccount(
|
||||
state,
|
||||
null,
|
||||
null,
|
||||
rootGetters
|
||||
)(1, 'auto_resolve_conversations')
|
||||
).toEqual(true);
|
||||
});
|
||||
|
||||
it('isFeatureEnabledGlobally', () => {
|
||||
const state = {
|
||||
records: [accountData],
|
||||
};
|
||||
expect(
|
||||
getters.isFeatureEnabledGlobally(state)(1, 'auto_resolve_conversations')
|
||||
).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user