Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app): disable module calibration if heating or cooling #15054

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add test for temperature status error
  • Loading branch information
ncdiehl11 committed May 1, 2024
commit ad8fc393d0fa58da9c298174300e6d1bc7602e2f
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
Loading