Skip to content

Commit c620507

Browse files
author
Christina Mullen
committed
pr fix
1 parent a2cc5df commit c620507

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

packages/contact-center/task/src/CallControlCAD/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ const CallControlCADInternal: React.FunctionComponent<CallControlProps> = observ
4949
agentId,
5050
});
5151

52-
if (currentTask && isUnacceptedCampaignPreview(currentTask, acceptedCampaignIds)) {
52+
if (!currentTask) {
53+
return <></>;
54+
}
55+
56+
if (isUnacceptedCampaignPreview(currentTask, acceptedCampaignIds)) {
5357
return <></>;
5458
}
5559

packages/contact-center/task/tests/TaskList/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import store from '@webex/cc-store';
77

88
// Mock `@webex/cc-store`.
99
const taskListMock = [
10-
{id: 1, data: {interaction: {callAssociatedDetails: {ani: '1234567890'}}}},
11-
{id: 2, data: {interaction: {callAssociatedDetails: {ani: '9876543210'}}}},
10+
{id: 1, data: {interaction: {callAssociatedDetails: {ani: '1234567890'}, callProcessingDetails: {}}}},
11+
{id: 2, data: {interaction: {callAssociatedDetails: {ani: '9876543210'}, callProcessingDetails: {}}}},
1212
];
1313
jest.mock('@webex/cc-store', () => ({
1414
cc: {},
@@ -21,6 +21,9 @@ jest.mock('@webex/cc-store', () => ({
2121
setTaskRejected: jest.fn(),
2222
setTaskSelected: jest.fn(),
2323
isIncomingTask: jest.fn(),
24+
acceptedCampaignIds: new Set(),
25+
CAMPAIGN_PREVIEW_OUTBOUND_TYPES: ['STANDARD_PREVIEW_CAMPAIGN', 'DIRECT_PREVIEW_CAMPAIGN'],
26+
CAMPAIGN_PREVIEW_CAMPAIGN_TYPES: ['preview_standard', 'preview_direct'],
2427
logger: {
2528
log: jest.fn(),
2629
error: jest.fn(),

0 commit comments

Comments
 (0)