Skip to content

Commit a4079e3

Browse files
fix(app): Ensure shuttle empty view in ER (#18967)
1 parent c1d09e5 commit a4079e3

12 files changed

+131
-9
lines changed
64 KB
Loading

app/src/assets/localization/en/error_recovery.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,5 +165,7 @@
165165
"use_dry_unused_tips": "Use dry, unused tips for best results",
166166
"view_error_details": "View error details",
167167
"view_recovery_options": "View recovery options",
168-
"you_can_still_drop_tips": "You can still drop the attached tips before proceeding to tip selection."
168+
"you_can_still_drop_tips": "You can still drop the attached tips before proceeding to tip selection.",
169+
"ensure_stacker_shuttle_empty": "Ensure stacker labware shuttle is empty",
170+
"empty_shuttle_to_retry_retrieve": "Empty the labware shuttle so that the stacker is able to retry the retrieve command."
169171
}

app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/StackerHopperEmptyRetry.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { RECOVERY_MAP } from '../constants'
2-
import { RetryStepInfo, StackerHopperLwInfo } from '../shared'
2+
import {
3+
RetryStepInfo,
4+
StackerHopperLwInfo,
5+
TwoColTextAndImage,
6+
} from '../shared'
37
import { SelectRecoveryOption } from './SelectRecoveryOption'
48

59
import type { RecoveryContentProps } from '../types'
@@ -14,6 +18,8 @@ export function StackerHopperEmptyRetry(
1418
switch (step) {
1519
case STACKER_HOPPER_EMPTY_RETRY.STEPS.FILL_HOPPER:
1620
return <StackerHopperLwInfo {...props} />
21+
case STACKER_HOPPER_EMPTY_RETRY.STEPS.ENSURE_SHUTTLE_EMPTY:
22+
return <TwoColTextAndImage {...props} />
1723
case STACKER_HOPPER_EMPTY_RETRY.STEPS.RETRY:
1824
return <RetryStepInfo {...props} />
1925
default:

app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/StackerShuttleEmptyRetry.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
StackerHomeShuttle,
88
StackerHopperLwInfo,
99
StackerReengageLatch,
10+
TwoColTextAndImage,
1011
} from '../shared'
1112
import { SelectRecoveryOption } from './SelectRecoveryOption'
1213

@@ -32,6 +33,8 @@ export function StackerShuttleEmptyRetry(
3233
return <StackerReengageLatch {...props} />
3334
case STACKER_SHUTTLE_EMPTY_RETRY.STEPS.FILL_HOPPER:
3435
return <StackerHopperLwInfo {...props} />
36+
case STACKER_SHUTTLE_EMPTY_RETRY.STEPS.ENSURE_SHUTTLE_EMPTY:
37+
return <TwoColTextAndImage {...props} />
3538
case STACKER_SHUTTLE_EMPTY_RETRY.STEPS.RETRY:
3639
return <RetryStepInfo {...props} />
3740
default:

app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/StackerShuttleMissing.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
StackerHomeShuttle,
55
StackerHopperLwInfo,
66
StackerLoadShuttle,
7+
TwoColTextAndImage,
78
} from '../shared'
89
import { SelectRecoveryOption } from './SelectRecoveryOption'
910

@@ -23,6 +24,8 @@ export function StackerShuttleMissing(
2324
return <StackerLoadShuttle {...props} />
2425
case STACKER_SHUTTLE_MISSING_RETRY.STEPS.CHECK_HOPPER:
2526
return <StackerHopperLwInfo {...props} />
27+
case STACKER_SHUTTLE_MISSING_RETRY.STEPS.ENSURE_SHUTTLE_EMPTY:
28+
return <TwoColTextAndImage {...props} />
2629
case STACKER_SHUTTLE_MISSING_RETRY.STEPS.RETRY:
2730
return <RetryStepInfo {...props} />
2831
default:

app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/StackerStalledRetry.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
RetryStepInfo,
44
StackerHomeShuttle,
55
StackerHopperLwInfo,
6+
TwoColTextAndImage,
67
} from '../shared'
78
import { SelectRecoveryOption } from './SelectRecoveryOption'
89

@@ -21,6 +22,8 @@ export function StackerStalledRetry(props: RecoveryContentProps): JSX.Element {
2122
return <StackerHopperLwInfo {...props} />
2223
case STACKER_STALLED_RETRY.STEPS.RETRY:
2324
return <RetryStepInfo {...props} />
25+
case STACKER_STALLED_RETRY.STEPS.ENSURE_SHUTTLE_EMPTY:
26+
return <TwoColTextAndImage {...props} />
2427
default:
2528
console.warn(
2629
`StackerStalledRetry: ${step} in ${route} not explicitly handled. Rerouting.`

app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/StackerHopperEmptyRetry.test.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ import { i18n } from '/app/i18n'
66

77
import { mockRecoveryContentProps } from '../../__fixtures__'
88
import { RECOVERY_MAP } from '../../constants'
9-
import { RetryStepInfo, StackerHopperLwInfo } from '../../shared'
9+
import {
10+
RetryStepInfo,
11+
StackerHopperLwInfo,
12+
TwoColTextAndImage,
13+
} from '../../shared'
1014
import { SelectRecoveryOption } from '../SelectRecoveryOption'
1115
import { StackerHopperEmptyRetry } from '../StackerHopperEmptyRetry'
1216

@@ -38,6 +42,9 @@ describe('StackerHopperEmptyRetry', () => {
3842
<div>MOCK_STACKER_HOPPER_LW_INFO</div>
3943
)
4044
vi.mocked(RetryStepInfo).mockReturnValue(<div>MOCK_RETRY_STEP_INFO</div>)
45+
vi.mocked(TwoColTextAndImage).mockReturnValue(
46+
<div>MOCK_TWO_COLUMN_AND_IMAGE</div>
47+
)
4148
})
4249

4350
afterEach(() => {
@@ -51,6 +58,13 @@ describe('StackerHopperEmptyRetry', () => {
5158
screen.getByText('MOCK_STACKER_HOPPER_LW_INFO')
5259
})
5360

61+
it(`renders twoColumnAndImage when step is ${RECOVERY_MAP.STACKER_HOPPER_EMPTY_RETRY.STEPS.ENSURE_SHUTTLE_EMPTY}`, () => {
62+
props.recoveryMap.step =
63+
RECOVERY_MAP.STACKER_HOPPER_EMPTY_RETRY.STEPS.ENSURE_SHUTTLE_EMPTY
64+
render(props)
65+
screen.getByText('MOCK_TWO_COLUMN_AND_IMAGE')
66+
})
67+
5468
it(`renders RetryStepInfo when step is ${RECOVERY_MAP.STACKER_HOPPER_EMPTY_RETRY.STEPS.RETRY}`, () => {
5569
props.recoveryMap.step = RECOVERY_MAP.STACKER_HOPPER_EMPTY_RETRY.STEPS.RETRY
5670
render(props)

app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/StackerShuttleEmptyRetry.test.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
StackerHomeShuttle,
1515
StackerHopperLwInfo,
1616
StackerReengageLatch,
17+
TwoColTextAndImage,
1718
} from '../../shared'
1819
import { SelectRecoveryOption } from '../SelectRecoveryOption'
1920
import { StackerShuttleEmptyRetry } from '../StackerShuttleEmptyRetry'
@@ -57,6 +58,9 @@ describe('StackerShuttleEmptyRetry', () => {
5758
<div>MOCK_STACKER_HOPPER_LW_INFO</div>
5859
)
5960
vi.mocked(RetryStepInfo).mockReturnValue(<div>MOCK_RETRY_STEP_INFO</div>)
61+
vi.mocked(TwoColTextAndImage).mockReturnValue(
62+
<div>MOCK_TWO_COLUMN_AND_IMAGE</div>
63+
)
6064
})
6165

6266
afterEach(() => {
@@ -105,6 +109,13 @@ describe('StackerShuttleEmptyRetry', () => {
105109
screen.getByText('MOCK_STACKER_HOPPER_LW_INFO')
106110
})
107111

112+
it(`renders twoColumnAndImage when step is ${RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_RETRY.STEPS.ENSURE_SHUTTLE_EMPTY}`, () => {
113+
props.recoveryMap.step =
114+
RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_RETRY.STEPS.ENSURE_SHUTTLE_EMPTY
115+
render(props)
116+
screen.getByText('MOCK_TWO_COLUMN_AND_IMAGE')
117+
})
118+
108119
it(`renders RetryStepInfo when step is ${RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_RETRY.STEPS.RETRY}`, () => {
109120
props.recoveryMap.step =
110121
RECOVERY_MAP.STACKER_SHUTTLE_EMPTY_RETRY.STEPS.RETRY

app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/StackerShuttleMissing.test.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
StackerLoadShuttle,
1717
StackerReengageLatch,
1818
StackerShuttleLwInfo,
19+
TwoColTextAndImage,
1920
} from '../../shared'
2021
import { SelectRecoveryOption } from '../SelectRecoveryOption'
2122
import { StackerShuttleMissing } from '../StackerShuttleMissing'
@@ -66,6 +67,9 @@ describe('StackerShuttleMissing', () => {
6667
<div>MOCK_STACKER_HOPPER_LW_INFO</div>
6768
)
6869
vi.mocked(RetryStepInfo).mockReturnValue(<div>MOCK_RETRY_STEP_INFO</div>)
70+
vi.mocked(TwoColTextAndImage).mockReturnValue(
71+
<div>MOCK_TWO_COLUMN_AND_IMAGE</div>
72+
)
6973
})
7074

7175
afterEach(() => {
@@ -93,6 +97,13 @@ describe('StackerShuttleMissing', () => {
9397
screen.getByText('MOCK_STACKER_HOPPER_LW_INFO')
9498
})
9599

100+
it(`renders twoColumnAndImage when step is ${RECOVERY_MAP.STACKER_SHUTTLE_MISSING_RETRY.STEPS.ENSURE_SHUTTLE_EMPTY}`, () => {
101+
props.recoveryMap.step =
102+
RECOVERY_MAP.STACKER_SHUTTLE_MISSING_RETRY.STEPS.ENSURE_SHUTTLE_EMPTY
103+
render(props)
104+
screen.getByText('MOCK_TWO_COLUMN_AND_IMAGE')
105+
})
106+
96107
it(`renders RetryStepInfo when step is ${RECOVERY_MAP.STACKER_SHUTTLE_MISSING_RETRY.STEPS.RETRY}`, () => {
97108
props.recoveryMap.step =
98109
RECOVERY_MAP.STACKER_SHUTTLE_MISSING_RETRY.STEPS.RETRY

app/src/organisms/ErrorRecoveryFlows/RecoveryOptions/__tests__/StackerStalledRetry.test.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
RetryStepInfo,
1111
StackerHomeShuttle,
1212
StackerHopperLwInfo,
13+
TwoColTextAndImage,
1314
} from '../../shared'
1415
import { SelectRecoveryOption } from '../SelectRecoveryOption'
1516
import { StackerStalledRetry } from '../StackerStalledRetry'
@@ -45,6 +46,9 @@ describe('StackerStalledRetry', () => {
4546
<div>MOCK_STACKER_HOPPER_LW_INFO</div>
4647
)
4748
vi.mocked(RetryStepInfo).mockReturnValue(<div>MOCK_RETRY_STEP_INFO</div>)
49+
vi.mocked(TwoColTextAndImage).mockReturnValue(
50+
<div>MOCK_TWO_COLUMN_AND_IMAGE</div>
51+
)
4852
})
4953

5054
afterEach(() => {
@@ -72,6 +76,13 @@ describe('StackerStalledRetry', () => {
7276
screen.getByText('MOCK_STACKER_HOPPER_LW_INFO')
7377
})
7478

79+
it(`renders twoColumnAndImage when step is ${RECOVERY_MAP.STACKER_STALLED_RETRY.STEPS.ENSURE_SHUTTLE_EMPTY}`, () => {
80+
props.recoveryMap.step =
81+
RECOVERY_MAP.STACKER_STALLED_RETRY.STEPS.ENSURE_SHUTTLE_EMPTY
82+
render(props)
83+
screen.getByText('MOCK_TWO_COLUMN_AND_IMAGE')
84+
})
85+
7586
it(`renders RetryStepInfo when step is ${RECOVERY_MAP.STACKER_STALLED_RETRY.STEPS.RETRY}`, () => {
7687
props.recoveryMap.step = RECOVERY_MAP.STACKER_STALLED_RETRY.STEPS.RETRY
7788
render(props)

0 commit comments

Comments
 (0)