From 11dc56a8905533474ba24f785aed2af1b897e251 Mon Sep 17 00:00:00 2001 From: Vlad Velici Date: Wed, 4 Dec 2024 16:05:28 +0000 Subject: [PATCH] Test operation fields in chat history --- test/core/messages.integration.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/core/messages.integration.test.ts b/test/core/messages.integration.test.ts index 538f7330..dd346c6d 100644 --- a/test/core/messages.integration.test.ts +++ b/test/core/messages.integration.test.ts @@ -284,8 +284,8 @@ describe('messages integration', { timeout: 10000 }, () => { expect(history.items[0]?.isUpdated).toBe(false); expect(history.items[0]?.isDeleted).toBe(true); expect(history.items[0]?.deletedAt).toEqual(deletedMessage1.deletedAt); - // todo: uncomment when operation is returned correctly in history endpoint - // expect(history.items[0]?.deletedBy).toEqual(deletedMessage1.deletedBy); + expect(history.items[0]?.deletedBy).toEqual(deletedMessage1.deletedBy); + expect(history.items[0]?.operation?.description).toEqual('Deleted message'); // We shouldn't have a "next" link in the response expect(history.hasNext()).toBe(false); @@ -325,8 +325,8 @@ describe('messages integration', { timeout: 10000 }, () => { expect(history.items[0]?.isUpdated).toBe(true); expect(history.items[0]?.isDeleted).toBe(false); expect(history.items[0]?.updatedAt).toEqual(updatedMessage1.updatedAt); - // todo: uncomment when operation is returned correctly in history endpoint - // expect(history.items[0]?.updatedBy).toEqual(updatedMessage1.updatedBy); + expect(history.items[0]?.updatedBy).toEqual(updatedMessage1.updatedBy); + expect(history.items[0]?.operation?.description).toEqual('updated message'); // We shouldn't have a "next" link in the response expect(history.hasNext()).toBe(false);