diff --git a/apps/chat-e2e/src/tests/monitoring/createNewConversation.test.ts b/apps/chat-e2e/src/tests/monitoring/createNewConversation.test.ts index d4c0781d67..80b09768e5 100644 --- a/apps/chat-e2e/src/tests/monitoring/createNewConversation.test.ts +++ b/apps/chat-e2e/src/tests/monitoring/createNewConversation.test.ts @@ -24,7 +24,6 @@ dialTest( 'Create new conversation and send new message', async ({ dialHomePage, - header, conversations, talkToEntities, entitySettings, @@ -34,33 +33,14 @@ dialTest( addons, }) => { const expectedAddons = ModelsUtil.getAddons(); + const request = 'test request'; + await dialTest.step( - 'Create new conversation and verify it is moved under Today section in chat bar', + 'Verify the list of recent entities and default settings for default model', async () => { await dialHomePage.openHomePage(); await dialHomePage.waitForPageLoaded(); - await header.createNewConversation(); - - const todayConversations = await conversations.getTodayConversations(); - expect - .soft( - todayConversations.length, - ExpectedMessages.newConversationCreated, - ) - .toBe(2); - for (const todayConversation of todayConversations) { - expect - .soft(todayConversation, ExpectedMessages.conversationOfToday) - .toEqual( - expect.stringContaining(ExpectedConstants.newConversationTitle), - ); - } - }, - ); - await dialTest.step( - 'Verify the list of recent entities and default settings for default model', - async () => { const expectedDefaultRecentEntities = []; for (const entity of recentModelIds) { expectedDefaultRecentEntities.push( @@ -110,7 +90,7 @@ dialTest( await dialHomePage.mockChatTextResponse( MockedChatApiResponseBodies.simpleTextBody, ); - await chat.sendRequestWithKeyboard('test request'); + await chat.sendRequestWithKeyboard(request); const messagesCount = await chatMessages.chatMessages.getElementsCount(); expect @@ -118,5 +98,21 @@ dialTest( .toBe(2); }, ); + + await dialTest.step( + 'Verify new conversation is moved under Today section in chat bar', + async () => { + const todayConversations = await conversations.getTodayConversations(); + expect + .soft( + todayConversations.length, + ExpectedMessages.newConversationCreated, + ) + .toBe(1); + expect + .soft(todayConversations[0], ExpectedMessages.conversationOfToday) + .toBe(request); + }, + ); }, ); diff --git a/apps/chat-e2e/src/tests/monitoring/deleteFolderWithConversations.test.ts b/apps/chat-e2e/src/tests/monitoring/deleteFolderWithConversations.test.ts index 13156191e7..5b03b24076 100644 --- a/apps/chat-e2e/src/tests/monitoring/deleteFolderWithConversations.test.ts +++ b/apps/chat-e2e/src/tests/monitoring/deleteFolderWithConversations.test.ts @@ -33,12 +33,9 @@ dialTest( 'hidden', ); - const todayConversations = await conversations.getTodayConversations(); + const todayConversationsCount = await conversations.getEntitiesCount(); expect - .soft( - todayConversations.includes(conversationInFolder.conversations[0].name), - ExpectedMessages.conversationOfToday, - ) - .toBeFalsy(); + .soft(todayConversationsCount, ExpectedMessages.entitiesCountIsValid) + .toBe(0); }, );