feat: Display "Snoozed Until" time on conversation header (#3028)
This commit is contained in:
@@ -217,15 +217,24 @@ describe('#actions', () => {
|
||||
describe('#toggleStatus', () => {
|
||||
it('sends correct mutations if toggle status is successful', async () => {
|
||||
axios.post.mockResolvedValue({
|
||||
data: { payload: { conversation_id: 1, current_status: 'resolved' } },
|
||||
data: {
|
||||
payload: {
|
||||
conversation_id: 1,
|
||||
current_status: 'snoozed',
|
||||
snoozed_until: null,
|
||||
},
|
||||
},
|
||||
});
|
||||
await actions.toggleStatus(
|
||||
{ commit },
|
||||
{ conversationId: 1, status: 'resolved' }
|
||||
{ conversationId: 1, status: 'snoozed' }
|
||||
);
|
||||
expect(commit).toHaveBeenCalledTimes(1);
|
||||
expect(commit.mock.calls).toEqual([
|
||||
['RESOLVE_CONVERSATION', { conversationId: 1, status: 'resolved' }],
|
||||
[
|
||||
'CHANGE_CONVERSATION_STATUS',
|
||||
{ conversationId: 1, status: 'snoozed', snoozedUntil: null },
|
||||
],
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -161,7 +161,7 @@ describe('#mutations', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('#RESOLVE_CONVERSATION', () => {
|
||||
describe('#CHANGE_CONVERSATION_STATUS', () => {
|
||||
it('updates the conversation status correctly', () => {
|
||||
const state = {
|
||||
allConversations: [
|
||||
@@ -173,7 +173,7 @@ describe('#mutations', () => {
|
||||
],
|
||||
};
|
||||
|
||||
mutations[types.RESOLVE_CONVERSATION](state, {
|
||||
mutations[types.CHANGE_CONVERSATION_STATUS](state, {
|
||||
conversationId: '1',
|
||||
status: 'resolved',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user