Chore: Contact Sidebar, conversation cleanup (#908)
- Update sidebar design - Move every contact data to contacts module - Revert go to next conversation feature - Fix issues with new conversation in action cable - Escape HTML content - Broadcast event when conversation.contact changes. Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
@@ -9,10 +9,16 @@ jest.mock('axios');
|
||||
describe('#actions', () => {
|
||||
describe('#getConversation', () => {
|
||||
it('sends correct actions if API is success', async () => {
|
||||
axios.get.mockResolvedValue({ data: { id: 1, meta: {} } });
|
||||
axios.get.mockResolvedValue({
|
||||
data: { id: 1, meta: { sender: { id: 1, name: 'Contact 1' } } },
|
||||
});
|
||||
await actions.getConversation({ commit }, 1);
|
||||
expect(commit.mock.calls).toEqual([
|
||||
[types.default.ADD_CONVERSATION, { id: 1, meta: {} }],
|
||||
[
|
||||
types.default.ADD_CONVERSATION,
|
||||
{ id: 1, meta: { sender: { id: 1, name: 'Contact 1' } } },
|
||||
],
|
||||
['contacts/SET_CONTACT_ITEM', { id: 1, name: 'Contact 1' }],
|
||||
]);
|
||||
});
|
||||
it('sends correct actions if API is error', async () => {
|
||||
|
||||
Reference in New Issue
Block a user