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): handle detaching 96 when attaching right #16174

Merged
Show file tree
Hide file tree
Changes from 3 commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ const mockPipetteInfo = [
const mockPipettesInProtocolNotEmpty = [
{ id: '123', pipetteName: 'p1000_single_flex', mount: 'left' },
]
const mockPipettesInProtocolOnRight = [
{ id: '123', pipetteName: 'p1000_single_flex', mount: 'right' },
]
const mockPipettesInProtocolMulti = [
{ id: '123', pipetteName: 'p1000_multi_flex', mount: 'left' },
]
Expand Down Expand Up @@ -113,7 +116,7 @@ describe('getPipetteWizardStepsForProtocol', () => {
).toStrictEqual(mockFlowSteps)
})

it('returns the correct array of info when the attached 96-channel pipette needs to be switched out for single mount', () => {
it('returns the correct array of info when the attached 96-channel pipette needs to be switched out for single mount on left', () => {
const mockFlowSteps = [
{
section: SECTIONS.BEFORE_BEGINNING,
Expand Down Expand Up @@ -176,6 +179,69 @@ describe('getPipetteWizardStepsForProtocol', () => {
)
).toStrictEqual(mockFlowSteps)
})
it('returns the correct array of info when the attached 96-channel pipette needs to be switched out for single mount on right', () => {
const mockFlowSteps = [
{
section: SECTIONS.BEFORE_BEGINNING,
mount: LEFT,
flowType: FLOWS.DETACH,
},
{
section: SECTIONS.DETACH_PIPETTE,
mount: LEFT,
flowType: FLOWS.DETACH,
},
{
section: SECTIONS.MOUNTING_PLATE,
mount: LEFT,
flowType: FLOWS.DETACH,
},
{
section: SECTIONS.CARRIAGE,
mount: LEFT,
flowType: FLOWS.DETACH,
},
{
section: SECTIONS.RESULTS,
mount: LEFT,
flowType: FLOWS.DETACH,
nextMount: RIGHT,
},
{
section: SECTIONS.MOUNT_PIPETTE,
mount: RIGHT,
flowType: FLOWS.ATTACH,
},
{
section: SECTIONS.FIRMWARE_UPDATE,
mount: RIGHT,
flowType: FLOWS.ATTACH,
},
{ section: SECTIONS.RESULTS, mount: RIGHT, flowType: FLOWS.ATTACH },
{
section: SECTIONS.ATTACH_PROBE,
mount: RIGHT,
flowType: FLOWS.ATTACH,
},
{
section: SECTIONS.DETACH_PROBE,
mount: RIGHT,
flowType: FLOWS.ATTACH,
},
{
section: SECTIONS.RESULTS,
mount: RIGHT,
flowType: FLOWS.CALIBRATE,
},
] as PipetteWizardStep[]
expect(
getPipetteWizardStepsForProtocol(
{ left: mock96ChannelAttachedPipetteInformation, right: null },
mockPipettesInProtocolOnRight as any,
RIGHT
)
).toStrictEqual(mockFlowSteps)
})
it('returns the correct array of info when the attached pipette on left mount needs to be switched out for 96-channel', () => {
const mockFlowSteps = [
{
Expand Down
Loading
Loading