fix: keep pending widget conversations visible and searchable
Build and publish Docker images / Build and publish images (push) Successful in 2m25s
Build and publish Docker images / Build and publish images (push) Successful in 2m25s
This commit is contained in:
@@ -159,6 +159,13 @@ describe('#getters', () => {
|
||||
meta: { team: { id: 5 } },
|
||||
labels: ['sales'],
|
||||
},
|
||||
{
|
||||
id: 33,
|
||||
inbox_id: 4,
|
||||
status: 1,
|
||||
meta: { assignee: { id: 9 }, assignee_type: 'AgentBot' },
|
||||
labels: [],
|
||||
},
|
||||
];
|
||||
|
||||
expect(
|
||||
@@ -180,6 +187,13 @@ describe('#getters', () => {
|
||||
meta: { team: { id: 5 } },
|
||||
labels: ['sales'],
|
||||
},
|
||||
{
|
||||
id: 33,
|
||||
inbox_id: 4,
|
||||
status: 1,
|
||||
meta: { assignee: { id: 9 }, assignee_type: 'AgentBot' },
|
||||
labels: [],
|
||||
},
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
findPendingMessageIndex,
|
||||
isConversationUnassigned,
|
||||
applyPageFilters,
|
||||
filterByInbox,
|
||||
filterByTeam,
|
||||
@@ -56,6 +57,24 @@ describe('#findPendingMessageIndex', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('#isConversationUnassigned', () => {
|
||||
it('treats an agent-bot conversation as unassigned for agent queues', () => {
|
||||
expect(
|
||||
isConversationUnassigned({
|
||||
meta: { assignee: { id: 7 }, assignee_type: 'AgentBot' },
|
||||
})
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it('does not treat a human-assigned conversation as unassigned', () => {
|
||||
expect(
|
||||
isConversationUnassigned({
|
||||
meta: { assignee: { id: 7 }, assignee_type: 'User' },
|
||||
})
|
||||
).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#applyPageFilters', () => {
|
||||
describe('#filter-team', () => {
|
||||
it('returns true if conversation has team and team filter is active', () => {
|
||||
|
||||
Reference in New Issue
Block a user