Skip to content

Commit

Permalink
Updating naming from gen3 to flex in app and components
Browse files Browse the repository at this point in the history
  • Loading branch information
smb2268 committed Jul 13, 2023
1 parent 16db70d commit 3ed3374
Show file tree
Hide file tree
Showing 27 changed files with 72 additions and 74 deletions.
6 changes: 3 additions & 3 deletions app/src/molecules/PipetteSelect/PipetteSelect.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ PipetteSelect.args = {
nameBlocklist: [
'p20_multi_gen2',
'p300_multi_gen2',
'p20_single_gen3',
'p300_single_gen3',
'p1000_single_gen3',
'p20_single_flex',
'p300_single_flex',
'p1000_single_flex',
],
enableNoneOption: true,
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const equipmentImages = {
calibration_probe: require('../../assets/images/change-pip/calibration_probe.png'),
t10_torx_screwdriver: require('../../assets/images/t10_torx_screwdriver.png'),
hex_screwdriver: require('../../assets/images/change-pip/hex_screwdriver.png'),
gen3_pipette: require('../../assets/images/change-pip/single_mount_pipettes.png'),
flex_pipette: require('../../assets/images/change-pip/single_mount_pipettes.png'),
pipette_96: require('../../assets/images/change-pip/ninety-six-channel.png'),
mounting_plate_96_channel: require('../../assets/images/change-pip/mounting-plate-96-channel.png'),
flex_gripper: require('../../assets/images/flex_gripper.svg'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ describe('PipetteCard', () => {
it('renders banner to calibrate for ot3 pipette if not calibrated', () => {
when(mockUseIsOT3).calledWith(mockRobotName).mockReturnValue(true)
const { getByText } = render({
pipetteInfo: { ...mockLeftSpecs, name: 'p300_single_gen3' },
pipetteInfo: { ...mockLeftSpecs, name: 'p300_single_flex' },
mount: LEFT,
robotName: mockRobotName,
is96ChannelAttached: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('PipetteOverflowMenu', () => {
).toBeInTheDocument()
})

it('renders only the about pipette button if OT-3/GEN3 pipette is attached', () => {
it('renders only the about pipette button if FLEX pipette is attached', () => {
mockIsOT3Pipette.mockReturnValue(true)

const { getByRole, queryByRole } = render(props)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const mockGripperData = {
ok: true,
}
const mockLeftPipetteData = {
instrumentModel: 'p1000_multi_gen3',
instrumentModel: 'p1000_multi_flex',
instrumentType: 'p1000',
mount: 'left',
serialNumber: 'def456',
Expand Down Expand Up @@ -71,7 +71,7 @@ describe('ProtocolInstrumentMountItem', () => {
mount: LEFT,
attachedInstrument: null,
attachedCalibrationData: null,
speccedName: 'p1000_multi_gen3',
speccedName: 'p1000_multi_flex',
}
mockPipetteWizardFlows.mockReturnValue(<div>pipette wizard flow</div>)
mockUseMaintenanceRunTakeover.mockReturnValue({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const RUN_ID = 'mockRunId'
const mockMissingPipette = [
{
hardwareType: 'pipette',
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
mount: 'left',
connected: false,
},
Expand All @@ -51,7 +51,7 @@ const mockMissingModule = [
const missingBoth = [
{
hardwareType: 'pipette',
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
mount: 'left',
connected: false,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ describe('useMissingHardwareText', () => {
useMissingHardwareText([
{
hardwareType: 'pipette',
pipetteName: 'p50_multi_gen3',
pipetteName: 'p50_multi_flex',
mount: 'left',
connected: false,
},
{
hardwareType: 'pipette',
pipetteName: 'p1000_multi_gen3',
pipetteName: 'p1000_multi_flex',
mount: 'right',
connected: false,
},
Expand All @@ -103,7 +103,7 @@ describe('useMissingHardwareText', () => {
useMissingHardwareText([
{
hardwareType: 'pipette',
pipetteName: 'p50_multi_gen3',
pipetteName: 'p50_multi_flex',
mount: 'left',
connected: false,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe('BeforeBeginning', () => {
params: {
mount: LEFT,
pipetteId: 'abc',
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
},
},
{ commandType: 'home' as const, params: {} },
Expand Down Expand Up @@ -179,7 +179,7 @@ describe('BeforeBeginning', () => {
requiredPipette: {
mount: LEFT,
id: 'abc',
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
},
}
const { getByText, getByAltText, getByRole } = render(props)
Expand All @@ -206,7 +206,7 @@ describe('BeforeBeginning', () => {
params: {
mount: LEFT,
pipetteId: 'abc',
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
},
},
{ commandType: 'home' as const, params: {} },
Expand Down Expand Up @@ -247,7 +247,7 @@ describe('BeforeBeginning', () => {
params: {
mount: LEFT,
pipetteId: 'abc',
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
},
},
{ commandType: 'home' as const, params: {} },
Expand Down Expand Up @@ -346,7 +346,7 @@ describe('BeforeBeginning', () => {
params: {
mount: RIGHT,
pipetteId: 'abc',
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
},
},
{ commandType: 'home' as const, params: {} },
Expand Down Expand Up @@ -398,7 +398,7 @@ describe('BeforeBeginning', () => {
params: {
mount: LEFT,
pipetteId: 'abc',
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
},
},
{ commandType: 'home' as const, params: {} },
Expand Down Expand Up @@ -455,7 +455,7 @@ describe('BeforeBeginning', () => {
params: {
mount: LEFT,
pipetteId: 'abc',
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
},
},
{ commandType: 'home' as const, params: {} },
Expand Down Expand Up @@ -515,7 +515,7 @@ describe('BeforeBeginning', () => {
params: {
mount: LEFT,
pipetteId: 'abc',
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
},
},
{ commandType: 'home' as const, params: {} },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe('PipetteWizardFlows', () => {
params: {
mount: LEFT,
pipetteId: 'abc',
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
},
},
{ commandType: 'home' as const, params: {} },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ describe('Results', () => {
{
commandType: 'loadPipette' as const,
params: {
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
pipetteId: 'abc',
mount: 'left',
},
Expand Down Expand Up @@ -124,7 +124,7 @@ describe('Results', () => {
{
commandType: 'loadPipette' as const,
params: {
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
pipetteId: 'abc',
mount: 'left',
},
Expand Down Expand Up @@ -320,7 +320,7 @@ describe('Results', () => {
flowType: FLOWS.ATTACH,
requiredPipette: {
id: 'mockId',
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
mount: LEFT,
},
}
Expand All @@ -333,7 +333,7 @@ describe('Results', () => {
flowType: FLOWS.ATTACH,
requiredPipette: {
id: 'mockId',
pipetteName: 'p50_multi_gen3',
pipetteName: 'p50_multi_flex',
mount: LEFT,
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const mockPipetteInfo = [
] as LoadedPipette[]

const mockPipettesInProtocolNotEmpty = [
{ id: '123', pipetteName: 'p1000_single_gen3', mount: 'left' },
{ id: '123', pipetteName: 'p1000_single_flex', mount: 'left' },
]
const mockPipettesInProtocolMulti = [
{ id: '123', pipetteName: 'p1000_multi_gen3', mount: 'left' },
{ id: '123', pipetteName: 'p1000_multi_flex', mount: 'left' },
]
const mockSingleMountPipetteAttached = {
left: mockAttachedPipetteInformation,
Expand All @@ -32,7 +32,7 @@ describe('getPipetteWizardStepsForProtocol', () => {
[
{
id: '123',
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
mount: 'left',
},
],
Expand Down Expand Up @@ -74,7 +74,7 @@ describe('getPipetteWizardStepsForProtocol', () => {
data: { calibratedOffset: undefined as any },
} as any,
},
[{ id: '123', pipetteName: 'p1000_single_gen3', mount: 'right' }],
[{ id: '123', pipetteName: 'p1000_single_flex', mount: 'right' }],
RIGHT
)
).toStrictEqual(mockFlowSteps)
Expand Down
8 changes: 4 additions & 4 deletions app/src/organisms/PipetteWizardFlows/__tests__/hooks.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ describe('usePipetteFlowWizardHeaderText', () => {
pipetteInfo: [
{
id: 'id',
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
mount: LEFT,
},
],
Expand All @@ -282,7 +282,7 @@ describe('usePipetteFlowWizardHeaderText', () => {
pipetteInfo: [
{
id: 'id',
pipetteName: 'p1000_single_gen3',
pipetteName: 'p1000_single_flex',
mount: LEFT,
},
],
Expand Down Expand Up @@ -415,7 +415,7 @@ describe('usePipetteFlowWizardHeaderText', () => {
pipetteInfo: [
{
id: 'id',
pipetteName: 'p50_single_gen3',
pipetteName: 'p50_single_flex',
mount: LEFT,
},
],
Expand All @@ -440,7 +440,7 @@ describe('usePipetteFlowWizardHeaderText', () => {
pipetteInfo: [
{
id: 'id',
pipetteName: 'p50_single_gen3',
pipetteName: 'p50_single_flex',
mount: LEFT,
},
],
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/PipetteWizardFlows/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const HEX_SCREWDRIVER = {
'Provided with the robot. Using another size can strip the instruments’s screws.',
}
export const PIPETTE = {
loadName: 'gen3_pipette',
loadName: 'flex_pipette',
displayName: PIPETTE_DISPLAY_NAME,
}
export const NINETY_SIX_CHANNEL_PIPETTE = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function OverflowMenu({
showPipetteWizardFlows,
setShowPipetteWizardFlows,
] = React.useState<boolean>(false)
const isGen3Pipette = isOT3Pipette(pipetteName as PipetteName)
const isFlexPipette = isOT3Pipette(pipetteName as PipetteName)
const ot3PipCal =
useAttachedPipettesFromInstrumentsQuery()[mount]?.data?.calibratedOffset
?.offset ?? null
Expand All @@ -102,7 +102,7 @@ export function OverflowMenu({
e.preventDefault()
if (
!isRunning &&
isGen3Pipette &&
isFlexPipette &&
calType === 'pipetteOffset' &&
pipetteName != null
) {
Expand Down Expand Up @@ -199,7 +199,7 @@ export function OverflowMenu({
right={0}
flexDirection={DIRECTION_COLUMN}
>
{isGen3Pipette ? (
{isFlexPipette ? (
<MenuItem onClick={handleRecalibrate}>
{t(
ot3PipCal == null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ describe('OverflowMenu', () => {
expect(saveAs).toHaveBeenCalled()
})

it('recalibration button should open up the pipette wizard flow for gen3 pipettes', () => {
it('recalibration button should open up the pipette wizard flow for flex pipettes', () => {
mockUseAttachedPipettesFromInstrumentsQuery.mockReturnValue({
left: mockAttachedPipetteInformation,
right: null,
Expand All @@ -207,7 +207,7 @@ describe('OverflowMenu', () => {
getByText('mock pipette wizard flows')
})

it('calibration button should open up the pipette wizard flow for gen3 pipettes', () => {
it('calibration button should open up the pipette wizard flow for flex pipettes', () => {
mockPipetteWizardFlow.mockReturnValue(<div>mock pipette wizard flows</div>)
mockUseAllPipetteOffsetCalibrationsQuery.mockReturnValue({
data: {
Expand Down
6 changes: 3 additions & 3 deletions app/src/pages/Protocols/hooks/__tests__/hooks.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const PROTOCOL_ANALYSIS = {
id: 'fake analysis',
status: 'completed',
labware: [],
pipettes: [{ id: 'pipId', pipetteName: 'p1000_multi_gen3', mount: 'left' }],
pipettes: [{ id: 'pipId', pipetteName: 'p1000_multi_flex', mount: 'left' }],
modules: [
{
id: 'modId',
Expand Down Expand Up @@ -152,7 +152,7 @@ describe('useMissingProtocolHardware', () => {
expect(result.current).toEqual([
{
hardwareType: 'pipette',
pipetteName: 'p1000_multi_gen3',
pipetteName: 'p1000_multi_flex',
mount: 'left',
connected: false,
},
Expand All @@ -167,7 +167,7 @@ describe('useMissingProtocolHardware', () => {
it('should return empty array when the correct modules and pipettes are attached', () => {
mockUseAttachedPipettes.mockReturnValue({
left: {
name: 'p1000_multi_gen3',
name: 'p1000_multi_flex',
},
right: {},
} as any)
Expand Down
Loading

0 comments on commit 3ed3374

Please sign in to comment.