Skip to content

Commit f2370ac

Browse files
authored
fix(app): do not disable heater shaker temp control when shaking (#12425)
Only the shake controls of the heater shaker module need to be disabled if the module is shaking. No need to disable temperature controls too Closes RQA-617
1 parent d1db655 commit f2370ac

File tree

2 files changed

+2
-37
lines changed

2 files changed

+2
-37
lines changed

app/src/organisms/ModuleCard/HeaterShakerSlideout.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ export const HeaterShakerSlideout = (
3737
const { createLiveCommand } = useCreateLiveCommandMutation()
3838
const moduleName = getModuleDisplayName(module.moduleModel)
3939
const modulePart = t('temperature')
40-
const isShaking = module.data.speedStatus !== 'idle'
4140

42-
const sendSetTemperatureOrShakeCommand: React.MouseEventHandler<HTMLInputElement> = e => {
41+
const sendSetTemperatureCommand: React.MouseEventHandler<HTMLInputElement> = e => {
4342
e.preventDefault()
4443
e.stopPropagation()
4544

@@ -89,7 +88,7 @@ export const HeaterShakerSlideout = (
8988
<SubmitPrimaryButton
9089
form="HeaterShakerSlideout_submitValue"
9190
value={t('confirm')}
92-
onClick={sendSetTemperatureOrShakeCommand}
91+
onClick={sendSetTemperatureCommand}
9392
disabled={hsValue === null || errorMessage !== null}
9493
data-testid={`HeaterShakerSlideout_btn_${module.serialNumber}`}
9594
/>
@@ -131,7 +130,6 @@ export const HeaterShakerSlideout = (
131130
unit: unit,
132131
})}
133132
error={errorMessage}
134-
disabled={isShaking}
135133
/>
136134
</form>
137135
</Flex>

app/src/organisms/ModuleCard/__tests__/HeaterShakerSlideout.test.tsx

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,6 @@ const render = (props: React.ComponentProps<typeof HeaterShakerSlideout>) => {
1818
})[0]
1919
}
2020

21-
const mockMovingHeaterShaker = {
22-
id: 'heatershaker_id',
23-
moduleModel: 'heaterShakerModuleV1',
24-
moduleType: 'heaterShakerModuleType',
25-
serialNumber: 'jkl123',
26-
hardwareRevision: 'heatershaker_v4.0',
27-
firmwareVersion: 'v2.0.0',
28-
hasAvailableUpdate: true,
29-
data: {
30-
labwareLatchStatus: 'idle_closed',
31-
speedStatus: 'speeding up',
32-
temperatureStatus: 'idle',
33-
currentSpeed: null,
34-
currentTemperature: null,
35-
targetSpeed: null,
36-
targetTemp: null,
37-
errorDetails: null,
38-
status: 'idle',
39-
},
40-
usbPort: { path: '/dev/ot_module_heatershaker0', port: 1 },
41-
} as any
42-
4321
describe('HeaterShakerSlideout', () => {
4422
let props: React.ComponentProps<typeof HeaterShakerSlideout>
4523
let mockCreateLiveCommand = jest.fn()
@@ -111,15 +89,4 @@ describe('HeaterShakerSlideout', () => {
11189
expect(props.onCloseClick).toHaveBeenCalled()
11290
expect(input).not.toHaveValue()
11391
})
114-
115-
it('input value is disabled when heater shaker is shaking', () => {
116-
props = {
117-
module: mockMovingHeaterShaker,
118-
isExpanded: true,
119-
onCloseClick: jest.fn(),
120-
}
121-
const { getByTestId } = render(props)
122-
const input = getByTestId('heaterShakerModuleV1_setTemp')
123-
expect(input).toBeDisabled()
124-
})
12592
})

0 commit comments

Comments
 (0)