mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-06 05:57:49 +00:00
* feat: Add support for bulk snooze until * feat: Adds support for all snooze option in bulk actions * chore: Adds comment * chore: Review fixes * chore: Minor fix * chore: Minor fix * chore: Review fixes * chore: yarn changes * fix: terminal waring * chore: Adds spec * Update conversationHotKeys.js --------- Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
34 lines
1.3 KiB
JavaScript
34 lines
1.3 KiB
JavaScript
import types from '../../../mutation-types';
|
|
import { mutations } from '../../bulkActions';
|
|
|
|
describe('#mutations', () => {
|
|
describe('#toggleUiFlag', () => {
|
|
it('set update flags', () => {
|
|
const state = { uiFlags: { isUpdating: false } };
|
|
mutations[types.SET_BULK_ACTIONS_FLAG](state, { isUpdating: true });
|
|
expect(state.uiFlags.isUpdating).toEqual(true);
|
|
});
|
|
});
|
|
describe('#setSelectedConversationIds', () => {
|
|
it('set selected conversation ids', () => {
|
|
const state = { selectedConversationIds: [] };
|
|
mutations[types.SET_SELECTED_CONVERSATION_IDS](state, [1, 2, 3]);
|
|
expect(state.selectedConversationIds).toEqual([1, 2, 3]);
|
|
});
|
|
});
|
|
describe('#removeSelectedConversationIds', () => {
|
|
it('remove selected conversation ids', () => {
|
|
const state = { selectedConversationIds: [1, 2, 3] };
|
|
mutations[types.REMOVE_SELECTED_CONVERSATION_IDS](state, 1);
|
|
expect(state.selectedConversationIds).toEqual([2, 3]);
|
|
});
|
|
});
|
|
describe('#clearSelectedConversationIds', () => {
|
|
it('clear selected conversation ids', () => {
|
|
const state = { selectedConversationIds: [1, 2, 3] };
|
|
mutations[types.CLEAR_SELECTED_CONVERSATION_IDS](state);
|
|
expect(state.selectedConversationIds).toEqual([]);
|
|
});
|
|
});
|
|
});
|