diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/GripperIsHoldingLabware.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/GripperIsHoldingLabware.tsx index 6f4157bc909..d198dcc8dac 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/GripperIsHoldingLabware.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/GripperIsHoldingLabware.tsx @@ -55,6 +55,7 @@ export function GripperIsHoldingLabware({ // after the user has extricated the labware from the gripper jaws. void handleMotionRouting(true) .then(() => homeExceptPlungers()) + .finally(() => handleMotionRouting(false)) .then(() => { switch (selectedRecoveryOption) { case MANUAL_MOVE_AND_SKIP.ROUTE: @@ -73,7 +74,6 @@ export function GripperIsHoldingLabware({ } } }) - .finally(() => handleMotionRouting(false)) } const primaryOnClick = (): void => { diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/GripperIsHoldingLabware.test.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/GripperIsHoldingLabware.test.tsx index 3279bdfea7c..875c79fe09c 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/GripperIsHoldingLabware.test.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/__tests__/GripperIsHoldingLabware.test.tsx @@ -96,16 +96,16 @@ describe('GripperIsHoldingLabware', () => { expect(mockHomeExceptPlungers).toHaveBeenCalled() }) + await waitFor(() => { + expect(mockHandleMotionRouting).toHaveBeenCalledWith(false) + }) + await waitFor(() => { expect(mockProceedToRouteAndStep).toHaveBeenCalledWith( RECOVERY_MAP.MANUAL_MOVE_AND_SKIP.ROUTE, RECOVERY_MAP.MANUAL_MOVE_AND_SKIP.STEPS.MANUAL_MOVE ) }) - - await waitFor(() => { - expect(mockHandleMotionRouting).toHaveBeenCalledWith(false) - }) }) it(`proceeds to the correct step when the no option is clicked for ${RECOVERY_MAP.MANUAL_REPLACE_AND_RETRY.ROUTE}`, async () => {