Show Reddit post age in conversations

This commit is contained in:
jjbrunton committed 2026-08-09 09:54:53 +01:00
1 parent 7db60e8839
commit 50f9f8a6aa
14 files changed
+65 -11

No files matched your search

+2
View File
@@ -49,6 +49,7 @@ function detailFixture(chat = alice) {
title: 'Looking for a chat',
url: 'https://reddit.com/r/casualconversation/comments/post-1',
imageUrl: 'https://i.redd.it/source-post.jpg',
postedAt: Date.now() - (2 * 60 * 60 * 1000),
sentAt: 1_785_999_800_000,
},
automation: { turnsUsed: 0, remainingTurns: 3, status: 'active', handoffReason: null },
@@ -142,6 +143,7 @@ describe('ConversationsPage', () => {
'src',
'https://i.redd.it/source-post.jpg',
);
expect(screen.getByText('2h ago')).toBeInTheDocument();
expect(screen.getByRole('img', { name: 'Source post: Looking for a chat' })).toHaveClass('is-blurred');
await user.click(screen.getByRole('button', { name: 'Reveal original image' }));
expect(screen.getByRole('img', { name: 'Source post: Looking for a chat' })).not.toHaveClass('is-blurred');