File tree 6 files changed +16
-8
lines changed
ChooseRobotToRunProtocolSlideout
6 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,13 @@ import type { HostConfig } from '../types'
5
5
import type {
6
6
Run ,
7
7
LabwareOffsetCreateData ,
8
- RuntimeParameterCreateData ,
8
+ RunTimeParameterCreateData ,
9
9
} from './types'
10
10
11
11
export interface CreateRunData {
12
12
protocolId ?: string
13
13
labwareOffsets ?: LabwareOffsetCreateData [ ]
14
- runTimeParameterValues ?: RuntimeParameterCreateData
14
+ runTimeParameterValues ?: RunTimeParameterCreateData
15
15
}
16
16
17
17
export function createRun (
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ export interface LegacyGoodRunData {
47
47
modules : LoadedModule [ ]
48
48
protocolId ?: string
49
49
labwareOffsets ?: LabwareOffset [ ]
50
+ runTimeParameterValues ?: RunTimeParameterCreateData
50
51
}
51
52
52
53
export interface KnownGoodRunData extends LegacyGoodRunData {
@@ -125,7 +126,7 @@ export interface LabwareOffsetCreateData {
125
126
vector : VectorOffset
126
127
}
127
128
128
- export interface RuntimeParameterCreateData {
129
+ export interface RunTimeParameterCreateData {
129
130
[ key : string ] : string | boolean | number
130
131
}
131
132
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ import { useCreateRunFromProtocol } from '../ChooseRobotToRunProtocolSlideout/us
47
47
import { ApplyHistoricOffsets } from '../ApplyHistoricOffsets'
48
48
import { useOffsetCandidatesForAnalysis } from '../ApplyHistoricOffsets/hooks/useOffsetCandidatesForAnalysis'
49
49
import { getAnalysisStatus } from '../ProtocolsLanding/utils'
50
+ import type { RunTimeParameterCreateData } from '@opentrons/api-client'
50
51
import type { RunTimeParameter } from '@opentrons/shared-data'
51
52
import type { Robot } from '../../redux/discovery/types'
52
53
import type { StoredProtocolData } from '../../redux/protocol-storage'
@@ -161,7 +162,7 @@ export function ChooseProtocolSlideoutComponent(
161
162
definitionUri,
162
163
} ) )
163
164
: [ ] ,
164
- runTimeParametersOverrides . reduce (
165
+ runTimeParametersOverrides . reduce < RunTimeParameterCreateData > (
165
166
( acc , param ) =>
166
167
param . value !== param . default
167
168
? { ...acc , [ param . variableName ] : param . value }
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import type {
14
14
HostConfig ,
15
15
LabwareOffsetCreateData ,
16
16
Protocol ,
17
- RuntimeParameterCreateData ,
17
+ RunTimeParameterCreateData ,
18
18
} from '@opentrons/api-client'
19
19
import type { UseCreateRunMutationOptions } from '@opentrons/react-api-client/src/runs/useCreateRunMutation'
20
20
import type { CreateProtocolVariables } from '@opentrons/react-api-client/src/protocols/useCreateProtocolMutation'
@@ -37,7 +37,7 @@ export function useCreateRunFromProtocol(
37
37
options : UseCreateRunMutationOptions ,
38
38
hostOverride ?: HostConfig | null ,
39
39
labwareOffsets ?: LabwareOffsetCreateData [ ] ,
40
- runTimeParameterValues ?: RuntimeParameterCreateData
40
+ runTimeParameterValues ?: RunTimeParameterCreateData
41
41
) : UseCreateRun {
42
42
const contextHost = useHost ( )
43
43
const host =
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ describe('useCloneRun hook', () => {
30
30
id : RUN_ID ,
31
31
protocolId : 'protocolId' ,
32
32
labwareOffsets : 'someOffset' ,
33
+ runTimeParameterValues : 'someRtp' ,
33
34
} ,
34
35
} ,
35
36
} as any )
@@ -60,6 +61,7 @@ describe('useCloneRun hook', () => {
60
61
expect ( mockCreateRun ) . toHaveBeenCalledWith ( {
61
62
protocolId : 'protocolId' ,
62
63
labwareOffsets : 'someOffset' ,
64
+ runTimeParameterValues : 'someRtp' ,
63
65
} )
64
66
} )
65
67
} )
Original file line number Diff line number Diff line change @@ -30,8 +30,12 @@ export function useCloneRun(
30
30
} )
31
31
const cloneRun = ( ) : void => {
32
32
if ( runRecord != null ) {
33
- const { protocolId, labwareOffsets } = runRecord . data
34
- createRun ( { protocolId, labwareOffsets } )
33
+ const {
34
+ protocolId,
35
+ labwareOffsets,
36
+ runTimeParameterValues,
37
+ } = runRecord . data
38
+ createRun ( { protocolId, labwareOffsets, runTimeParameterValues } )
35
39
} else {
36
40
console . info ( 'failed to clone run record, source run record not found' )
37
41
}
You can’t perform that action at this time.
0 commit comments