Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
ncdiehl11 committed May 22, 2024
1 parent 0d4bd15 commit 19eb73d
Showing 1 changed file with 55 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,59 @@ describe('FileSidebar', () => {
'One or more modules specified in your protocol in Slot(s) A1,B1 are not currently used in any step. In order to run this protocol you will need to power up and connect the modules to your robot.'
)
})
it.only('renders the formatted unused pipettes and modules warning sorted by count', () => {
vi.mocked(getInitialDeckSetup).mockReturnValue({
modules: {
moduleId1: {
slot: 'A1',
moduleState: {} as any,
id: 'moduleId',
type: 'thermocyclerModuleType',
model: 'thermocyclerModuleV2',
},
moduleId2: {
slot: 'C3',
moduleState: {} as any,
id: 'moduleId1',
type: 'temperatureModuleType',
model: 'temperatureModuleV2',
},
moduleId3: {
slot: 'D3',
moduleState: {} as any,
id: 'moduleId2',
type: 'temperatureModuleType',
model: 'temperatureModuleV2',
},
moduleId4: {
slot: 'C1',
moduleState: {} as any,
id: 'moduleId3',
type: 'heaterShakerModuleType',
model: 'heaterShakerModuleV1',
},
},
pipettes: {
pipetteId: {
mount: 'left',
name: 'p1000_96',
id: 'pipetteId',
tiprackLabwareDef: [fixtureTiprack300ul as LabwareDefinition2],
tiprackDefURI: ['mockDefUri'],
spec: {
displayName: 'mock display name',
channels: 96,
} as any,
},
},
additionalEquipmentOnDeck: {},
labware: {},
})
render()
fireEvent.click(screen.getByRole('button', { name: 'Export' }))
screen.debug()
screen.getByText(
'The mock display name pipette and Temperature modules, Thermocycler module, and Heater-Shaker module in your protocol are not currently used in any step. In order to run this protocol you will need to attach this pipette as well as power up and connect the module to your robot.'
)
})
})

0 comments on commit 19eb73d

Please sign in to comment.