Skip to content

Commit

Permalink
test: remove test id
Browse files Browse the repository at this point in the history
  • Loading branch information
varshamenon4 committed Nov 20, 2024
1 parent d653476 commit 0fac6e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/ChatBox/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const ChatBox = ({ chatboxContainerRef }) => {
{messageList.filter((m) => (m.timestamp.date < today.date)).map(({ role, content, timestamp }) => (
<Message key={timestamp.toString()} variant={role} message={content} />
))}
<MessageDivider text="Today" data-testid="today-divider" />
<MessageDivider text="Today" />
{messageList.filter((m) => (m.timestamp.date === today.date)).map(({ role, content, timestamp }) => (
<Message key={timestamp.toString()} variant={role} message={content} />
))}
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/Xpert.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0fac6e8

Please sign in to comment.