diff --git a/src/components/ChatBox/index.jsx b/src/components/ChatBox/index.jsx index 6d5adc16..1e20512b 100644 --- a/src/components/ChatBox/index.jsx +++ b/src/components/ChatBox/index.jsx @@ -15,7 +15,7 @@ const ChatBox = ({ chatboxContainerRef }) => { {messageList.filter((m) => (m.timestamp.date < today.date)).map(({ role, content, timestamp }) => ( ))} - + {messageList.filter((m) => (m.timestamp.date === today.date)).map(({ role, content, timestamp }) => ( ))} diff --git a/src/widgets/Xpert.test.jsx b/src/widgets/Xpert.test.jsx index efd62b23..e4d9217a 100644 --- a/src/widgets/Xpert.test.jsx +++ b/src/widgets/Xpert.test.jsx @@ -365,7 +365,7 @@ test('message divider does not appear when no messages', async () => { expect(screen.getByRole('button', { name: 'submit' })).toBeVisible(); expect(screen.getByTestId('close-button')).toBeVisible(); - expect(screen.getByTestId('today-divider')).toBeVisible(); + expect(screen.getByText('Today')).toBeVisible(); }); // todo: test that today divider doesn't appear when messages all from today // todo: test that today divider appears when message from before today