feat: label AI-generated conversation messages
This commit is contained in:
1 parent
3beb8aada2
commit
5ad7f1bf77
10 files changed
+69
-11
No files matched your search
@@ -40,7 +40,7 @@ function detailFixture(chat = alice) {
|
||||
return {
|
||||
...chat,
|
||||
messages: [
|
||||
{ sender: 'me', text: 'Hello Alice', timestamp: 1_785_999_900_000, isSelf: true },
|
||||
{ sender: 'me', text: 'Hello Alice', timestamp: 1_785_999_900_000, isSelf: true, isAi: true },
|
||||
{ sender: 'alice', text: 'Good to hear from you', timestamp: 1_786_000_000_000, isSelf: false },
|
||||
],
|
||||
triggeringPost: {
|
||||
@@ -136,6 +136,7 @@ describe('ConversationsPage', () => {
|
||||
expect(profileLink).toHaveAttribute('href', 'https://www.reddit.com/u/alice');
|
||||
}
|
||||
expect(screen.getByText('Good to hear from you')).toBeInTheDocument();
|
||||
expect(screen.getByLabelText('Sent by AI')).toHaveTextContent('AI');
|
||||
expect(screen.getByRole('link', { name: 'Looking for a chat' })).toHaveAttribute('href', expect.stringContaining('post-1'));
|
||||
expect(screen.getByRole('img', { name: 'Source post: Looking for a chat' })).toHaveAttribute(
|
||||
'src',
|
||||
|
||||
Reference in new issue
Block a user