Skip to content

Commit

Permalink
add test for temperature status error
Browse files Browse the repository at this point in the history
  • Loading branch information
ncdiehl11 committed May 1, 2024
1 parent 1c3ff11 commit ad8fc39
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions app/src/organisms/ModuleCard/__tests__/ModuleOverflowMenu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,25 @@ describe('ModuleOverflowMenu', () => {
expect(calibrate).toBeDisabled()
})

it('renders a disabled calibrate button if module temperature status errors', () => {
vi.mocked(useIsFlex).mockReturnValue(true)
const mockHeatingModule = {
...mockHeaterShaker,
data: {
...mockHeaterShaker.data,
temperatureStatus: 'error' as TemperatureStatus,
},
}
props = {
...props,
module: mockHeatingModule,
}
render(props)

const calibrate = screen.getByRole('button', { name: 'Calibrate' })
expect(calibrate).toBeDisabled()
})

it('a mock function should be called when clicking Calibrate if pipette is ready', () => {
vi.mocked(useIsFlex).mockReturnValue(true)
props = {
Expand Down

0 comments on commit ad8fc39

Please sign in to comment.