feat: automate bounded image-sharing conversations
This commit is contained in:
1 parent
dcf57273e2
commit
3beb8aada2
15 files changed
+477
-19
No files matched your search
@@ -120,6 +120,15 @@ describe('conversations route', () => {
|
||||
expect(second.resources.activityLogRepo.insert).toHaveBeenCalledWith(expect.objectContaining({
|
||||
type: 'sent', recipient: 'alice',
|
||||
}));
|
||||
expect(second.resources.conversationStateRepo.save).toHaveBeenCalledWith(
|
||||
'same-room',
|
||||
expect.objectContaining({
|
||||
automation: expect.objectContaining({
|
||||
status: 'user-overridden',
|
||||
handoffReason: 'A manual reply was sent in this conversation.',
|
||||
}),
|
||||
}),
|
||||
);
|
||||
expect(first.resources.activityLogRepo.insert).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
@@ -258,7 +267,14 @@ describe('conversations route', () => {
|
||||
const response = await request(app, '/api/conversations/room-alice');
|
||||
|
||||
expect(response.status).toBe(200);
|
||||
expect((await response.json()).username).toBe('alice');
|
||||
const body = await response.json();
|
||||
expect(body.username).toBe('alice');
|
||||
expect(body.automation).toEqual({
|
||||
turnsUsed: 0,
|
||||
remainingTurns: 3,
|
||||
status: 'active',
|
||||
handoffReason: null,
|
||||
});
|
||||
expect(refreshTopChats).not.toHaveBeenCalled();
|
||||
expect(loadConversationDetails).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user