feat: Add reports about live agent load (#4537)

* feat: Add reports about live agent load
This commit is contained in:
Aswin Dev P.S
2022-04-25 20:04:41 +05:30
committed by GitHub
parent 899176a793
commit 676796ddc7
28 changed files with 758 additions and 48 deletions

View File

@@ -4,6 +4,7 @@ import * as types from '../../../mutation-types';
import agentList from './fixtures';
const commit = jest.fn();
const dispatch = jest.fn();
global.axios = axios;
jest.mock('axios');
@@ -97,7 +98,7 @@ describe('#actions', () => {
describe('#updatePresence', () => {
it('sends correct actions if API is success', async () => {
const data = { users: { 1: 'online' }, contacts: { 2: 'online' } };
actions.updatePresence({ commit }, data);
actions.updatePresence({ commit, dispatch }, data);
expect(commit.mock.calls).toEqual([
[types.default.SET_AGENT_UPDATING_STATUS, true],
[types.default.UPDATE_AGENTS_PRESENCE, data],