diff --git a/web-api/src/business/useCases/docketEntry/completeDocketEntryQCInteractor.ts b/web-api/src/business/useCases/docketEntry/completeDocketEntryQCInteractor.ts index 2da168680d9..1575934fa02 100644 --- a/web-api/src/business/useCases/docketEntry/completeDocketEntryQCInteractor.ts +++ b/web-api/src/business/useCases/docketEntry/completeDocketEntryQCInteractor.ts @@ -19,6 +19,7 @@ import { import { ServerApplicationContext } from '@web-api/applicationContext'; import { UnknownAuthUser } from '@shared/business/entities/authUser/AuthUser'; import { User } from '../../../../../shared/src/business/entities/User'; +import { WorkItem } from '@shared/business/entities/WorkItem'; import { addServedStampToDocument } from '@web-api/business/useCases/courtIssuedDocument/addServedStampToDocument'; import { aggregatePartiesForService } from '@shared/business/utilities/aggregatePartiesForService'; import { generateNoticeOfDocketChangePdf } from '@web-api/business/useCaseHelper/noticeOfDocketChange/generateNoticeOfDocketChangePdf'; @@ -174,7 +175,7 @@ const completeDocketEntryQC = async ( .getUseCaseHelpers() .updateCaseAutomaticBlock({ applicationContext, caseEntity }); - const workItemToUpdate = updatedDocketEntry.workItem; + const workItemToUpdate = updatedDocketEntry.workItem as WorkItem; Object.assign(workItemToUpdate, { docketEntry: { @@ -204,7 +205,7 @@ const completeDocketEntryQC = async ( sentByUserId: user.userId, }); - await saveWorkItem(workItemToUpdate.validate().toRawObject()); + await saveWorkItem({ workItem: workItemToUpdate.validate().toRawObject() }); let servedParties = aggregatePartiesForService(caseEntity); let paperServicePdfUrl; diff --git a/web-client/integration-tests/journey/petitionsClerkAssignsWorkItemToSelf.ts b/web-client/integration-tests/journey/petitionsClerkAssignsWorkItemToSelf.ts index 728b56f2f08..6f5ce9b9c22 100644 --- a/web-client/integration-tests/journey/petitionsClerkAssignsWorkItemToSelf.ts +++ b/web-client/integration-tests/journey/petitionsClerkAssignsWorkItemToSelf.ts @@ -28,12 +28,11 @@ export const petitionsClerkAssignsWorkItemToSelf = cerebralTest => { await cerebralTest.runSequence('selectWorkItemSequence', { workItem: unassignedWorkItem, }); + const selectedWorkItems = cerebralTest.getState('selectedWorkItems'); expect(selectedWorkItems.length).toEqual(1); cerebralTest.selectedWorkItem = selectedWorkItems[0]; - expect(unassignedWorkItem).toMatchObject({ - assigneeId: null, - }); + expect(unassignedWorkItem.assigneId).not.toBeDefined(); // select an assignee expect(cerebralTest.getState('assigneeId')).toBeNull();