feat: Add store for conversation watchers (#5808)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
committed by
GitHub
parent
6ff0c93659
commit
0d9ed0674b
@@ -0,0 +1,22 @@
|
||||
import { getters } from '../../conversationWatchers';
|
||||
import watchersData from './fixtures';
|
||||
|
||||
describe('#getters', () => {
|
||||
it('getByConversationId', () => {
|
||||
const state = { records: { 1: watchersData } };
|
||||
expect(getters.getByConversationId(state)(1)).toEqual(watchersData);
|
||||
});
|
||||
|
||||
it('getUIFlags', () => {
|
||||
const state = {
|
||||
uiFlags: {
|
||||
isFetching: false,
|
||||
isUpdating: false,
|
||||
},
|
||||
};
|
||||
expect(getters.getUIFlags(state)).toEqual({
|
||||
isFetching: false,
|
||||
isUpdating: false,
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user