H-16: align takeover with channel AI workflow (#2)
* feat(conversations): complete manual AI takeover * fix(conversations): align AI takeover flow with channel AI * fix(conversations): close takeover review gaps --------- Co-authored-by: Rogee <rogee@ipao.vip>
This commit is contained in:
@@ -23,7 +23,6 @@ describe('#AssignableAgentsAPI', () => {
|
||||
expect(axiosMock.get).toHaveBeenCalledWith('/api/v1/assignable_agents', {
|
||||
params: {
|
||||
inbox_ids: [1],
|
||||
include_agent_bots: true,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -12,6 +12,8 @@ describe('#ConversationAPI', () => {
|
||||
expect(conversationAPI).toHaveProperty('toggleStatus');
|
||||
expect(conversationAPI).toHaveProperty('assignAgent');
|
||||
expect(conversationAPI).toHaveProperty('assignTeam');
|
||||
expect(conversationAPI).toHaveProperty('startAITakeover');
|
||||
expect(conversationAPI).toHaveProperty('exitAITakeover');
|
||||
expect(conversationAPI).toHaveProperty('markMessageRead');
|
||||
expect(conversationAPI).toHaveProperty('toggleTyping');
|
||||
expect(conversationAPI).toHaveProperty('mute');
|
||||
@@ -79,7 +81,10 @@ describe('#ConversationAPI', () => {
|
||||
});
|
||||
|
||||
it('#toggleStatus', () => {
|
||||
conversationAPI.toggleStatus({ conversationId: 12, status: 'online' });
|
||||
conversationAPI.toggleStatus({
|
||||
conversationId: 12,
|
||||
status: 'online',
|
||||
});
|
||||
expect(axiosMock.post).toHaveBeenCalledWith(
|
||||
`/api/v1/conversations/12/toggle_status`,
|
||||
{
|
||||
@@ -93,17 +98,29 @@ describe('#ConversationAPI', () => {
|
||||
conversationAPI.assignAgent({
|
||||
conversationId: 12,
|
||||
agentId: 34,
|
||||
assigneeType: 'AgentBot',
|
||||
});
|
||||
expect(axiosMock.post).toHaveBeenCalledWith(
|
||||
`/api/v1/conversations/12/assignments`,
|
||||
{
|
||||
assignee_id: 34,
|
||||
assignee_type: 'AgentBot',
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
it('#startAITakeover', () => {
|
||||
conversationAPI.startAITakeover(12);
|
||||
expect(axiosMock.post).toHaveBeenCalledWith(
|
||||
'/api/v1/conversations/12/ai_takeover'
|
||||
);
|
||||
});
|
||||
|
||||
it('#exitAITakeover', () => {
|
||||
conversationAPI.exitAITakeover(12);
|
||||
expect(axiosMock.delete).toHaveBeenCalledWith(
|
||||
'/api/v1/conversations/12/ai_takeover'
|
||||
);
|
||||
});
|
||||
|
||||
it('#assignTeam', () => {
|
||||
conversationAPI.assignTeam({ conversationId: 12, teamId: 1 });
|
||||
expect(axiosMock.post).toHaveBeenCalledWith(
|
||||
|
||||
Reference in New Issue
Block a user