mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-24 23:15:11 +00:00
feat: Split reconnect logic PR (store) (#9520)
# Pull Request Template ## Description This PR includes store filter parts split from this [Reconnect PR](https://github.com/chatwoot/chatwoot/pull/9453)
This commit is contained in:
@@ -659,4 +659,32 @@ describe('#addMentions', () => {
|
||||
expect(commit.mock.calls).toEqual([[types.SET_CONTEXT_MENU_CHAT_ID, 1]]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#setChatListFilters', () => {
|
||||
it('set chat list filters', () => {
|
||||
const filters = {
|
||||
inboxId: 1,
|
||||
assigneeType: 'me',
|
||||
status: 'open',
|
||||
sortBy: 'created_at',
|
||||
page: 1,
|
||||
labels: ['label'],
|
||||
teamId: 1,
|
||||
conversationType: 'mention',
|
||||
};
|
||||
actions.setChatListFilters({ commit }, filters);
|
||||
expect(commit.mock.calls).toEqual([
|
||||
[types.SET_CHAT_LIST_FILTERS, filters],
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#updateChatListFilters', () => {
|
||||
it('update chat list filters', () => {
|
||||
actions.updateChatListFilters({ commit }, { updatedWithin: 20 });
|
||||
expect(commit.mock.calls).toEqual([
|
||||
[types.UPDATE_CHAT_LIST_FILTERS, { updatedWithin: 20 }],
|
||||
]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user