Skip to content

Commit

Permalink
fix(app): disable pipette settings during active run (#14578)
Browse files Browse the repository at this point in the history
In pipette overflow menu for OT-2 pipettes, the 'Pipette settings' menu item should be disabled during an active run.

closes [RQA-2427](https://opentrons.atlassian.net/browse/RQA-2427)
  • Loading branch information
ncdiehl11 authored Mar 1, 2024
1 parent 7fb177e commit 323a2c7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export const PipetteOverflowMenu = (
<MenuItem
key={`${pipetteDisplayName}_${mount}_view_settings`}
onClick={() => handleSettingsSlideout()}
disabled={isRunActive}
>
{t('view_pipette_setting')}
</MenuItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ describe('PipetteOverflowMenu', () => {
expect(settings).not.toBeInTheDocument()
})

it('should disable certain menu items if a run is active', () => {
it('should disable certain menu items if a run is active for Flex pipette', () => {
mockisFlexPipette.mockReturnValue(true)
props = {
...props,
Expand All @@ -161,4 +161,28 @@ describe('PipetteOverflowMenu', () => {
})
).toBeDisabled()
})

it('should disable certain menu items if a run is active for OT-2 pipette', () => {
mockisFlexPipette.mockReturnValue(false)
props = {
...props,
isRunActive: true,
}
render(props)
expect(
screen.getByRole('button', {
name: 'Detach pipette',
})
).toBeDisabled()
expect(
screen.getByRole('button', {
name: 'Drop tips',
})
).toBeDisabled()
expect(
screen.getByRole('button', {
name: 'Pipette Settings',
})
).toBeDisabled()
})
})

0 comments on commit 323a2c7

Please sign in to comment.