feat: show ReplyTo in widget UI (#8094)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
@@ -110,7 +110,10 @@ describe('#actions', () => {
|
||||
search: '?param=1',
|
||||
},
|
||||
}));
|
||||
await actions.sendMessage({ commit, dispatch }, { content: 'hello' });
|
||||
await actions.sendMessage(
|
||||
{ commit, dispatch },
|
||||
{ content: 'hello', replyTo: 124 }
|
||||
);
|
||||
spy.mockRestore();
|
||||
windowSpy.mockRestore();
|
||||
expect(dispatch).toBeCalledWith('sendMessageWithData', {
|
||||
@@ -119,6 +122,7 @@ describe('#actions', () => {
|
||||
created_at: 1466424490,
|
||||
id: '1111',
|
||||
message_type: 0,
|
||||
replyTo: 124,
|
||||
status: 'in_progress',
|
||||
});
|
||||
});
|
||||
@@ -132,7 +136,10 @@ describe('#actions', () => {
|
||||
const thumbUrl = '';
|
||||
const attachment = { thumbUrl, fileType: 'file' };
|
||||
|
||||
actions.sendAttachment({ commit, dispatch }, { attachment });
|
||||
actions.sendAttachment(
|
||||
{ commit, dispatch },
|
||||
{ attachment, replyTo: 135 }
|
||||
);
|
||||
spy.mockRestore();
|
||||
expect(commit).toBeCalledWith('pushMessageToConversation', {
|
||||
id: '1111',
|
||||
@@ -140,6 +147,7 @@ describe('#actions', () => {
|
||||
status: 'in_progress',
|
||||
created_at: 1466424490,
|
||||
message_type: 0,
|
||||
replyTo: 135,
|
||||
attachments: [
|
||||
{
|
||||
thumb_url: '',
|
||||
|
||||
@@ -35,6 +35,15 @@ describe('#createTemporaryMessage', () => {
|
||||
expect(message.content).toBe('hello');
|
||||
expect(message.status).toBe('in_progress');
|
||||
});
|
||||
it('returns message object with reply to', () => {
|
||||
const message = createTemporaryMessage({
|
||||
content: 'hello',
|
||||
replyTo: 124,
|
||||
});
|
||||
expect(message.content).toBe('hello');
|
||||
expect(message.status).toBe('in_progress');
|
||||
expect(message.replyTo).toBe(124);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getNonDeletedMessages', () => {
|
||||
|
||||
Reference in New Issue
Block a user