import { fixtureP10Single } from '@opentrons/shared-data/pipette/fixtures/name' ; import type { PipetteSettings } from '../types' ; import type { RobotApiResponse , RobotApiResponseMeta , } from '../../robot-api/types' ; import { mockTipRackDefinition } from '../../custom-labware/__fixtures__' ; import { PipetteInfo } from '../../../organisms/ProtocolSetup/RunSetupCard/hooks/useCurrentRunPipetteInfoByMount' ; export const mockRobot = { name : 'robot' , ip : '127.0.0.1' , port : 31950 } ; export const mockAttachedPipette = { id : 'abc' , name : 'p300_single_gen2' , model : 'p300_single_v2.0' , tip_length : 42 , mount_axis : 'c' , plunger_axis : 'd' , } ; export const mockP300PipetteSpecs = { displayName : 'P300 Single-Channel GEN2' , name : 'p300_single_gen2' , backCompatNames : [ 'p300_single' ] , } ; export const mockUnattachedPipette = { id : null , name : null , model : null , mount_axis : 'a' , plunger_axis : 'b' , } ; export const mockFetchPipettesSuccessMeta = { method : 'GET' , path : '/pipettes' , ok : true , status : 200 , } ; export const mockFetchPipettesSuccess = { ... mockFetchPipettesSuccessMeta , host : mockRobot , body : { left : mockUnattachedPipette , right : mockAttachedPipette , } , } ; export const mockFetchPipettesFailureMeta = { method : 'GET' , path : '/pipettes' , ok : false , status : 500 , } ; export const mockFetchPipettesFailure = { ... mockFetchPipettesFailureMeta , host : mockRobot , body : { message : 'AH' } , } ; export const mockPipetteSettings = { info : { name : 'p300_single_gen2' , model : 'p300_single_v2.0' } , fields : { fieldId : { value : 42 , default : 42 } } , } ; export const mockFetchPipetteSettingsSuccessMeta = { method : 'GET' , path : '/pipettes/settings' , ok : true , status : 200 , } ; export const mockFetchPipetteSettingsSuccess = { ... mockFetchPipetteSettingsSuccessMeta , host : mockRobot , body : { abc : mockPipetteSettings } as { [ key ] : PipetteSettings ; } , } ; export const mockFetchPipetteSettingsFailureMeta = { method : 'GET' , path : '/pipettes/settings' , ok : false , status : 500 , } ; export const mockFetchPipetteSettingsFailure = { ... mockFetchPipetteSettingsFailureMeta , host : mockRobot , body : { message : 'AH' } , } ; export const mockUpdatePipetteSettingsSuccessMeta = { method : 'PATCH' , path : '/pipettes/settings/abc' , ok : true , status : 200 , } ; export const mockUpdatePipetteSettingsSuccess = { ... mockUpdatePipetteSettingsSuccessMeta , host : mockRobot , body : { fields : mockPipetteSettings . fields } , } ; export const mockUpdatePipetteSettingsFailureMeta = { method : 'PATCH' , path : '/pipettes/settings/abc' , ok : false , status : 500 , } ; export const mockUpdatePipetteSettingsFailure = { ... mockUpdatePipetteSettingsFailureMeta , host : mockRobot , body : { message : 'AH' } , } ; export const mockPipetteInfo = { pipetteSpecs : fixtureP10Single , requestedPipetteMatch : 'match' , pipetteCalDate : '2021-04-10' , tipRacksForPipette : [ { displayName : 'My TipRack' , lastModifiedDate : '2021-04-10' , tipRackDef : mockTipRackDefinition , } , ] , } ; export const mockLeftPipette = { id : 'abc' , model : 'mock_left_model' , } ; export const mockRightPipette = { id : 'def' , model : 'mock_right_model' , } ; export const mockLeftSpecs = { displayName : 'Left Pipette' , name : 'mock_left' , backCompatNames : [ 'mock_left_legacy' ] , } ; export const mockLeftLegacySpecs = { displayName : 'Left Pipette Legacy' , name : 'mock_left_legacy' , } ; export const mockRightSpecs = { displayName : 'Right Pipette' , name : 'mock_right' , } ; export const mockLeftProtoPipette = { mount : 'left' , name : 'mock_left_model' , modelSpecs : mockLeftSpecs , } ; export const mockRightProtoPipette = { mount : 'right' , name : 'mock_right_model' , modelSpecs : mockRightSpecs , } ; export const mockLeftPipetteCalibration = { pipette : 'abc' , mount : 'left' , offset : [ 0 , 1 , 2 ] , tiprack : 'some-tiprack' , lastModified : '2020-08-30T10:02' , } ; export const mockRightPipetteCalibration = { pipette : 'def' , mount : 'right' , offset : [ 1 , 2 , 3 ] , tiprack : 'some-other-tiprack' , lastModified : '2020-08-25T20:25' , } ;