Skip to content

Commit b13cd27

Browse files
authored
fix(app): Fix gripper recovery loop (#17241)
Closes RQA-3841
1 parent cf940fe commit b13cd27

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/src/organisms/ErrorRecoveryFlows/shared/GripperIsHoldingLabware.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export function GripperIsHoldingLabware({
5555
// after the user has extricated the labware from the gripper jaws.
5656
void handleMotionRouting(true)
5757
.then(() => homeExceptPlungers())
58+
.finally(() => handleMotionRouting(false))
5859
.then(() => {
5960
switch (selectedRecoveryOption) {
6061
case MANUAL_MOVE_AND_SKIP.ROUTE:
@@ -73,7 +74,6 @@ export function GripperIsHoldingLabware({
7374
}
7475
}
7576
})
76-
.finally(() => handleMotionRouting(false))
7777
}
7878

7979
const primaryOnClick = (): void => {

app/src/organisms/ErrorRecoveryFlows/shared/__tests__/GripperIsHoldingLabware.test.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,16 @@ describe('GripperIsHoldingLabware', () => {
9696
expect(mockHomeExceptPlungers).toHaveBeenCalled()
9797
})
9898

99+
await waitFor(() => {
100+
expect(mockHandleMotionRouting).toHaveBeenCalledWith(false)
101+
})
102+
99103
await waitFor(() => {
100104
expect(mockProceedToRouteAndStep).toHaveBeenCalledWith(
101105
RECOVERY_MAP.MANUAL_MOVE_AND_SKIP.ROUTE,
102106
RECOVERY_MAP.MANUAL_MOVE_AND_SKIP.STEPS.MANUAL_MOVE
103107
)
104108
})
105-
106-
await waitFor(() => {
107-
expect(mockHandleMotionRouting).toHaveBeenCalledWith(false)
108-
})
109109
})
110110

111111
it(`proceeds to the correct step when the no option is clicked for ${RECOVERY_MAP.MANUAL_REPLACE_AND_RETRY.ROUTE}`, async () => {

0 commit comments

Comments
 (0)