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:
@@ -91,4 +91,13 @@ describe('#actions', () => {
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#setActiveConversationFolder', () => {
|
||||
it('set active conversation folder', async () => {
|
||||
await actions.setActiveConversationFolder({ commit }, customViewList[0]);
|
||||
expect(commit.mock.calls).toEqual([
|
||||
[types.default.SET_ACTIVE_CONVERSATION_FOLDER, customViewList[0]],
|
||||
]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -76,4 +76,11 @@ describe('#getters', () => {
|
||||
isDeleting: false,
|
||||
});
|
||||
});
|
||||
|
||||
it('getActiveConversationFolder', () => {
|
||||
const state = { activeConversationFolder: customViewList[0] };
|
||||
expect(getters.getActiveConversationFolder(state)).toEqual(
|
||||
customViewList[0]
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -34,4 +34,12 @@ describe('#mutations', () => {
|
||||
expect(state.records).toEqual(updateCustomViewList);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#SET_ACTIVE_CONVERSATION_FOLDER', () => {
|
||||
it('set active conversation folder', () => {
|
||||
const state = { activeConversationFolder: customViewList[0] };
|
||||
mutations[types.SET_ACTIVE_CONVERSATION_FOLDER](state, customViewList[0]);
|
||||
expect(state.activeConversationFolder).toEqual(customViewList[0]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user