Skip to content

Commit

Permalink
feat(labware-creator): change tube rack inserts for custom tubes (#8060)
Browse files Browse the repository at this point in the history
Closes #7969
  • Loading branch information
IanLondon authored Jul 7, 2021
1 parent 5549266 commit f51ec8d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ context('Tubes and Rack', () => {
.first()
.trigger('mousedown')
cy.get('*[class^="Dropdown__option_label"]')
.contains('Tubes + Opentrons Tube Rack')
.contains('Tubes + Tube Rack')
.click()

// TODO(IL, 2021-05-15): give Dropdown component semantic selectors for E2E
cy.get('label')
.contains('Which tube rack insert?')
.contains('Which tube rack?')
.children()
.first()
.trigger('mousedown')
Expand Down Expand Up @@ -190,12 +190,12 @@ context('Tubes and Rack', () => {
.first()
.trigger('mousedown')
cy.get('*[class^="Dropdown__option_label"]')
.contains('Tubes + Opentrons Tube Rack')
.contains('Tubes + Tube Rack')
.click()

// TODO(IL, 2021-05-15): give Dropdown component semantic selectors for E2E
cy.get('label')
.contains('Which tube rack insert?')
.contains('Which tube rack?')
.children()
.first()
.trigger('mousedown')
Expand Down Expand Up @@ -367,18 +367,16 @@ context('Tubes and Rack', () => {
.first()
.trigger('mousedown')
cy.get('*[class^="Dropdown__option_label"]')
.contains('Tubes + Opentrons Tube Rack')
.contains('Tubes + Tube Rack')
.click()

// TODO(IL, 2021-05-15): give Dropdown component semantic selectors for E2E
cy.get('label')
.contains('Which tube rack insert?')
.contains('Which tube rack?')
.children()
.first()
.trigger('mousedown')
cy.get('*[class^="Dropdown__option_label"]')
.contains('24 tubes (snap cap)')
.click()
cy.get('*[class^="Dropdown__option_label"]').contains('24 tubes').click()

cy.contains('start creating labware').click({ force: true })
})
Expand Down
4 changes: 2 additions & 2 deletions labware-library/src/labware-creator/components/IntroCopy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const IntroCopy = (): JSX.Element => (
</LinkOut>
<p>
This tool will allow you to create definitions for well plates,
reservoirs, tubes in Opentrons tube racks, and plates/tubes in Opentrons
aluminum blocks that do not already exist on the{' '}
reservoirs, tubes in tube racks, and plates/tubes in Opentrons aluminum
blocks that do not already exist on the{' '}
<Link to={LINK_LABWARE_LIBRARY} className={styles.link}>
Labware Library
</Link>
Expand Down
18 changes: 12 additions & 6 deletions labware-library/src/labware-creator/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export type LabwareType =
export const labwareTypeOptions: Options = [
{ name: 'Well Plate', value: 'wellPlate' },
{ name: 'Reservoir', value: 'reservoir' },
{ name: 'Tubes + Opentrons Tube Rack', value: 'tubeRack' },
{ name: 'Tubes + Tube Rack', value: 'tubeRack' },
{ name: 'Tubes / Plates + Opentrons Aluminum Block', value: 'aluminumBlock' },
{ name: 'Tip Rack', value: 'tipRack' },
]
Expand Down Expand Up @@ -182,26 +182,31 @@ export interface ProcessedLabwareFields {

export const tubeRackInsertOptions: Options = [
{
name: '6 tubes',
name: 'Opentrons 6 tubes',
value: '6tubes',
imgSrc: require('./images/6x50mL_insert_large.png'),
},
{
name: '15 tubes',
name: 'Opentrons 15 tubes',
value: '15tubes',
imgSrc: require('./images/15x15mL_insert_large.png'),
},
{
name: '24 tubes (snap cap)',
name: 'Opentrons 24 tubes',
value: '24tubesSnapCap',
imgSrc: require('./images/24x1_5mL_insert_large.png'),
},
{
name: '10 tubes (2 size)',
name: 'Opentrons 10 tubes',
value: '10tubes',
imgSrc: require('./images/6x15mL_and_4x50mL_insert_large.png'),
disabled: true, // 6 + 4 tube rack not yet supported
},
{
name: 'Non-Opentrons tube rack',
value: 'customTubeRack',
imgSrc: require('./images/blank_insert_large.png'),
},
]

// fields that get auto-filled when tubeRackInsertLoadName is selected
Expand Down Expand Up @@ -244,6 +249,7 @@ export const tubeRackAutofills: {
gridOffsetX: '13.88',
gridOffsetY: '17.74',
},
customTubeRack: {}, // not an insert, no autofills
}

// NOTE: these images are from labware-library, not labware creator's local images dir
Expand Down Expand Up @@ -383,7 +389,7 @@ export const getDefaultFormState = (): LabwareFields => ({

export const LABELS: Record<keyof LabwareFields, string> = {
labwareType: 'What type of labware are you creating?',
tubeRackInsertLoadName: 'Which tube rack insert?',
tubeRackInsertLoadName: 'Which tube rack?',
aluminumBlockType: 'Which aluminum block?',
aluminumBlockChildType: 'What labware is on top of your aluminum block?',
handPlacedTipFit: 'Fit',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f51ec8d

Please sign in to comment.