Skip to content

Commit

Permalink
fix(app): ensure terminal run preview shows detail for load liquid co…
Browse files Browse the repository at this point in the history
…mmands

After a terminal run, we access the run record's data for commands, labware, pipettes, and modules.
We need to extend this to liquids so that the liquid's ID from its load command matches that on the
analysis-like object passed to command text.
  • Loading branch information
ncdiehl11 committed May 7, 2024
1 parent 16b94b5 commit 3090f18
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api-client/src/runs/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type {
Liquid,
LoadedLabware,
LoadedModule,
LoadedPipette,
Expand Down Expand Up @@ -46,6 +47,7 @@ export interface LegacyGoodRunData {
pipettes: LoadedPipette[]
labware: LoadedLabware[]
modules: LoadedModule[]
liquids: Liquid[]
protocolId?: string
labwareOffsets?: LabwareOffset[]
runTimeParameters: RunTimeParameter[]
Expand Down
8 changes: 8 additions & 0 deletions app/src/organisms/InterventionModal/__fixtures__/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
import type { RunData } from '@opentrons/api-client'
import type {
LabwareDefinitionsByUri,
Liquid,
LoadedLabware,
LoadedModule,
} from '@opentrons/shared-data'
Expand Down Expand Up @@ -176,6 +177,12 @@ export const mockThermocyclerModule: LoadedModule = {
serialNumber: 'dummySerialTC',
}

export const mockLiquid: Liquid = {
id: 'mockLiquid',
displayName: 'mock liquid',
description: 'this is my mock liquid description',
}

export const mockRunData: RunData = {
id: 'mockRunData',
createdAt: '',
Expand All @@ -188,6 +195,7 @@ export const mockRunData: RunData = {
pipettes: [],
labware: [mockLabwareOnModule, mockLabwareOnSlot, mockLabwareOffDeck],
modules: [mockModule],
liquids: [mockLiquid],
runTimeParameters: [],
}

Expand Down
1 change: 1 addition & 0 deletions app/src/organisms/RunPreview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export const RunPreviewComponent = (
labware: runRecord.data.labware ?? [],
modules: runRecord.data.modules ?? [],
pipettes: runRecord.data.pipettes ?? [],
liquids: runRecord.data.liquids ?? [],
commands: commands,
}
: robotSideAnalysis
Expand Down
9 changes: 9 additions & 0 deletions app/src/organisms/RunTimeControl/__fixtures__/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const mockPausedRun: RunData = {
pipettes: [],
labware: [],
modules: [],
liquids: [],
runTimeParameters: [],
}

Expand All @@ -66,6 +67,7 @@ export const mockPauseRequestedRun: RunData = {
pipettes: [],
labware: [],
modules: [],
liquids: [],
runTimeParameters: [],
}

Expand Down Expand Up @@ -96,6 +98,7 @@ export const mockRunningRun: RunData = {
pipettes: [],
labware: [],
modules: [],
liquids: [],
runTimeParameters: [],
}

Expand Down Expand Up @@ -136,6 +139,7 @@ export const mockFailedRun: RunData = {
pipettes: [],
labware: [],
modules: [],
liquids: [],
runTimeParameters: [],
}

Expand Down Expand Up @@ -171,6 +175,7 @@ export const mockStopRequestedRun: RunData = {
pipettes: [],
labware: [],
modules: [],
liquids: [],
runTimeParameters: [],
}

Expand Down Expand Up @@ -206,6 +211,7 @@ export const mockStoppedRun: RunData = {
pipettes: [],
labware: [],
modules: [],
liquids: [],
runTimeParameters: [],
}

Expand Down Expand Up @@ -236,6 +242,7 @@ export const mockSucceededRun: RunData = {
pipettes: [],
labware: [],
modules: [],
liquids: [],
runTimeParameters: [],
}

Expand All @@ -250,6 +257,7 @@ export const mockIdleUnstartedRun: RunData = {
pipettes: [],
labware: [],
modules: [],
liquids: [],
runTimeParameters: [],
}

Expand Down Expand Up @@ -280,6 +288,7 @@ export const mockIdleStartedRun: RunData = {
pipettes: [],
labware: [],
modules: [],
liquids: [],
runTimeParameters: [],
}

Expand Down
2 changes: 2 additions & 0 deletions react-api-client/src/runs/__fixtures__/runs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const mockPausedRun: RunData = {
pipettes: [],
labware: [],
modules: [],
liquids: [],
runTimeParameters: [],
}

Expand Down Expand Up @@ -62,6 +63,7 @@ export const mockRunningRun: RunData = {
pipettes: [],
labware: [],
modules: [],
liquids: [],
runTimeParameters: [],
}

Expand Down

0 comments on commit 3090f18

Please sign in to comment.