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:
@@ -93,7 +93,7 @@ export function MessagesPage() {
|
||||
|
||||
useEffect(() => {
|
||||
if (messages.length > 0) {
|
||||
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
|
||||
messagesEndRef.current?.scrollIntoView?.({ behavior: "smooth" });
|
||||
}
|
||||
}, [messages]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user