Skip to content

Commit

Permalink
feat(protocol-designer, step-generation): support for selecting multi…
Browse files Browse the repository at this point in the history
… tipracks per pipette (#14601)

closes AUTH-11, AUTH-13, AUTH-50
  • Loading branch information
jerader authored Mar 28, 2024
1 parent 51a15c4 commit bae275d
Show file tree
Hide file tree
Showing 89 changed files with 8,198 additions and 7,417 deletions.
4 changes: 2 additions & 2 deletions components/src/instrument/InfoItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from 'react'
import styles from './instrument.module.css'

export interface InfoItemProps {
title: string
title: string | null
value: string
className?: string
}
Expand All @@ -17,7 +17,7 @@ export function InfoItem(props: InfoItemProps): JSX.Element {

return (
<div className={className}>
<h2 className={styles.title}>{title}</h2>
{title != null ? <h2 className={styles.title}>{title}</h2> : null}
<span className={styles.value}>{value}</span>
</div>
)
Expand Down
16 changes: 11 additions & 5 deletions components/src/instrument/InstrumentInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export interface InstrumentInfoProps {
showMountLabel?: boolean | null
/** human-readable description, eg 'p300 Single-channel' */
description: string
/** paired tiprack model */
tiprackModel?: string
/** paired tiprack models */
tiprackModels?: string[]
/** if disabled, pipette & its info are grayed out */
isDisabled: boolean
/** specs of mounted pipette */
Expand Down Expand Up @@ -53,9 +53,15 @@ export function InstrumentInfo(props: InstrumentInfoProps): JSX.Element {
}
value={props.description}
/>
{props.tiprackModel && (
<InfoItem title="tip rack" value={props.tiprackModel} />
)}
{props.tiprackModels != null
? props.tiprackModels.map((model, index) => (
<InfoItem
key={`tiprackModel-${index}`}
title={index === 0 ? 'tip racks' : null}
value={model}
/>
))
: null}
</Flex>

{props.children}
Expand Down
14 changes: 8 additions & 6 deletions protocol-designer/cypress/integration/migrations.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ describe('Protocol fixtures migrate and match snapshots', () => {

const testCases = [
{
title: 'example_1_1_0 (schema 1, PD version 1.1.1) -> PD 8.0.x, schema 8',
title: 'example_1_1_0 (schema 1, PD version 1.1.1) -> PD 8.1.x, schema 8',
importFixture: '../../fixtures/protocol/1/example_1_1_0.json',
expectedExportFixture:
'../../fixtures/protocol/8/example_1_1_0MigratedToV8.json',
unusedPipettes: true,
migrationModal: 'newLabwareDefs',
},
{
title: 'doItAllV3 (schema 3, PD version 4.0.0) -> PD 8.0.x, schema 8',
title: 'doItAllV3 (schema 3, PD version 4.0.0) -> PD 8.1.x, schema 8',
importFixture: '../../fixtures/protocol/4/doItAllV3.json',
expectedExportFixture:
'../../fixtures/protocol/8/doItAllV3MigratedToV8.json',
unusedPipettes: false,
migrationModal: 'v8',
},
{
title: 'doItAllV4 (schema 4, PD version 4.0.0) -> PD 8.0.x, schema 8',
title: 'doItAllV4 (schema 4, PD version 4.0.0) -> PD 8.1.x, schema 8',
importFixture: '../../fixtures/protocol/4/doItAllV4.json',
expectedExportFixture:
'../../fixtures/protocol/8/doItAllV4MigratedToV8.json',
Expand All @@ -38,15 +38,16 @@ describe('Protocol fixtures migrate and match snapshots', () => {
},
{
title:
'doItAll78MigratedToV8 (schema 7, PD version 8.0.0) -> should migrate to 8.0.x, schema 8',
'doItAll78MigratedToV8 (schema 7, PD version 8.0.0) -> should migrate to 8.1.x, schema 8',
importFixture: '../../fixtures/protocol/7/doItAllV7.json',
expectedExportFixture:
'../../fixtures/protocol/8/doItAllV7MigratedToV8.json',
unusedPipettes: false,
migrationModal: 'v8',
},
{
title: '96-channel full and column schema 8 -> reimported as schema 8',
title:
'96-channel full and column schema 8 -> should migrate to 8.1.x, schema 8',
importFixture:
'../../fixtures/protocol/8/ninetySixChannelFullAndColumn.json',
expectedExportFixture:
Expand All @@ -55,7 +56,8 @@ describe('Protocol fixtures migrate and match snapshots', () => {
unusedPipettes: false,
},
{
title: 'doItAllV8 flex robot -> reimported, should not migrate',
title:
'doItAllV8 flex robot -> reimported, should migrate to 8.1.x, schema 8',
importFixture: '../../fixtures/protocol/8/doItAllV8.json',
expectedExportFixture: '../../fixtures/protocol/8/doItAllV8.json',
migrationModal: null,
Expand Down
Loading

0 comments on commit bae275d

Please sign in to comment.