Chore: Include Tamil, Arabic, other language updates (#1018)

Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
Sojan Jose
2020-07-08 00:59:30 +05:30
committed by GitHub
parent 0fc0dc1683
commit a77cc713c2
418 changed files with 19359 additions and 328 deletions

View File

@@ -1,11 +1,13 @@
import { playNotificationAudio } from 'shared/helpers/AudioNotificationHelper';
import { actions } from '../../conversation';
import getUuid from '../../../../helpers/uuid';
import { API } from 'widget/helpers/axios';
jest.mock('../../../../helpers/uuid');
jest.mock('shared/helpers/AudioNotificationHelper', () => ({
playNotificationAudio: jest.fn(),
}));
jest.mock('widget/helpers/axios');
const commit = jest.fn();
@@ -88,10 +90,21 @@ describe('#actions', () => {
});
describe('#setUserLastSeen', () => {
it('sends correct mutations', () => {
const lastSeen = Math.abs(Date.now() / 1000);
actions.setUserLastSeen({ commit }, { lastSeen });
expect(commit).toBeCalledWith('setMetaUserLastSeenAt', lastSeen);
it('sends correct mutations', async () => {
API.post.mockResolvedValue({ data: { success: true } });
await actions.setUserLastSeen({
commit,
getters: { getConversationSize: 2 },
});
expect(commit.mock.calls[0][0]).toEqual('setMetaUserLastSeenAt');
});
it('sends correct mutations', async () => {
API.post.mockResolvedValue({ data: { success: true } });
await actions.setUserLastSeen({
commit,
getters: { getConversationSize: 0 },
});
expect(commit.mock.calls).toEqual([]);
});
});
});