fix(GRO-985): fix Messages test mocks and scrollIntoView guard

- Wrap conversation mocks in { items, nextCursor } response shape
  (loadConversations reads json.items, bare array caused undefined.length crash)
- Guard scrollIntoView with ?. (jsdom doesn't implement it)
- Use getAllByText for text appearing in both preview and thread

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-05-14 16:12:31 +00:00
committed by The Dogfather [agent]
parent e605e1be74
commit 9d9d7da13d
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ export function MessagesPage() {
useEffect(() => {
if (messages.length > 0) {
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
messagesEndRef.current?.scrollIntoView?.({ behavior: "smooth" });
}
}, [messages]);