调整客服自动接待和手动排队规则

This commit is contained in:
songxinnuo
2026-11-04 13:37:26 +08:00
parent efb2e5b4b4
commit ba8a7104b3
22 changed files with 1086 additions and 21 deletions
+22
View File
@@ -614,6 +614,28 @@ test('failed transfers retain the conversation and draft', async () => {
assert.match(app.element('reply-status').textContent, /转接未成功/);
});
test('reassignment removes the old owners composer but retains unsent text for recovery', async () => {
const app = await workspace();
app.element('replyText').value = '尚未发送的处理意见';
app.hooks.poll = () => response({status:'active',owner_username:'bob',messages:[]});
await app.context.poll();
assert.equal(app.context.curSid,0);
assert.equal(app.context.sessions['7'],undefined);
assert.equal(app.context.drafts['7'],'尚未发送的处理意见');
assert.equal(app.element('routing-draft-recovery').hidden,false);
assert.match(app.element('routing-retired-drafts').innerHTML,/尚未发送的处理意见/);
});
test('moving a session to an offline group preserves the previous owners draft', async () => {
const app = await workspace();
app.element('replyText').value = '需要转交的草稿';
app.hooks.poll = () => response({status:'waiting',owner_username:null,messages:[]});
await app.context.poll();
assert.equal(app.context.curSid,0);
assert.equal(app.context.drafts['7'],'需要转交的草稿');
assert.match(app.element('routing-retired-drafts').innerHTML,/需要转交的草稿/);
});
test('cancelling the in-page transfer confirmation leaves the session untouched', async () => {
const app = await workspace(false, {confirmResult:false});
await app.context.transferSession();