H-43: fix WEB Captain takeover E2E flow (#8)
* test(shangwutong): cover CID rename reliability * H-43: fix WEB Captain takeover flow * H-48: preserve compatible provider model * H-49: make Captain takeover atomic * H-50: prevent duplicate widget initialization --------- Co-authored-by: Rogee <rogee@ipao.vip>
This commit is contained in:
@@ -802,6 +802,28 @@ describe('#mutations', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should update when route and API ids use different primitive types', () => {
|
||||
const state = {
|
||||
allConversations: [{ id: '3', status: 'pending', updated_at: 100 }],
|
||||
selectedChatId: '3',
|
||||
};
|
||||
|
||||
mutations[types.UPDATE_CONVERSATION](state, {
|
||||
id: 3,
|
||||
status: 'open',
|
||||
ai_takeover_active: false,
|
||||
updated_at: 200,
|
||||
});
|
||||
|
||||
expect(state.allConversations).toHaveLength(1);
|
||||
expect(state.allConversations[0]).toMatchObject({
|
||||
id: '3',
|
||||
status: 'open',
|
||||
ai_takeover_active: false,
|
||||
});
|
||||
expect(emitter.emit).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should add conversation if not found on normal view', () => {
|
||||
const state = {
|
||||
allConversations: [],
|
||||
|
||||
Reference in New Issue
Block a user