Chore: Include Tamil, Arabic, other language updates (#1018)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
@@ -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([]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user