{
- confirmed && setExpandedStepKey(LABWARE_SETUP_KEY)
setLpcComplete(confirmed)
+ if (confirmed) {
+ setExpandedStepKey(LABWARE_SETUP_KEY)
+ setMissingSteps(
+ missingSteps.filter(step => step !== 'applied_labware_offsets')
+ )
+ }
}}
offsetsConfirmed={lpcComplete}
/>
@@ -270,6 +292,9 @@ export function ProtocolRunSetup({
setLabwareConfirmed={(confirmed: boolean) => {
setLabwareSetupComplete(confirmed)
if (confirmed) {
+ setMissingSteps(
+ missingSteps.filter(step => step !== 'labware_placement')
+ )
const nextStep =
targetStepKeyInOrder.findIndex(v => v === LABWARE_SETUP_KEY) ===
targetStepKeyInOrder.length - 1
@@ -298,6 +323,7 @@ export function ProtocolRunSetup({
setLiquidSetupConfirmed={(confirmed: boolean) => {
setLiquidSetupComplete(confirmed)
if (confirmed) {
+ setMissingSteps(missingSteps.filter(step => step != 'liquids'))
setExpandedStepKey(null)
}
}}
diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunHeader.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunHeader.test.tsx
index 70b16c61b55..872dff5771f 100644
--- a/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunHeader.test.tsx
+++ b/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunHeader.test.tsx
@@ -97,7 +97,9 @@ import {
ProtocolDropTipModal,
useProtocolDropTipModal,
} from '../ProtocolDropTipModal'
+import { ConfirmMissingStepsModal } from '../ConfirmMissingStepsModal'
+import type { MissingSteps } from '../ProtocolRunSetup'
import type { UseQueryResult } from 'react-query'
import type { NavigateFunction } from 'react-router-dom'
import type { Mock } from 'vitest'
@@ -153,6 +155,7 @@ vi.mock('../../../ProtocolUpload/hooks/useMostRecentRunId')
vi.mock('../../../../resources/runs')
vi.mock('../../../ErrorRecoveryFlows')
vi.mock('../ProtocolDropTipModal')
+vi.mock('../ConfirmMissingStepsModal')
const ROBOT_NAME = 'otie'
const RUN_ID = '95e67900-bc9f-4fbf-92c6-cc4d7226a51b'
@@ -215,6 +218,7 @@ const mockDoorStatus = {
doorRequiredClosedForProtocol: true,
},
}
+let mockMissingSteps: MissingSteps = []
const render = () => {
return renderWithProviders(
@@ -224,6 +228,7 @@ const render = () => {
robotName={ROBOT_NAME}
runId={RUN_ID}
makeHandleJumpToStep={vi.fn(() => vi.fn())}
+ missingSetupSteps={mockMissingSteps}
/>
,
{ i18nInstance: i18n }
@@ -240,7 +245,7 @@ describe('ProtocolRunHeader', () => {
mockTrackProtocolRunEvent = vi.fn(() => new Promise(resolve => resolve({})))
mockCloseCurrentRun = vi.fn()
mockDetermineTipStatus = vi.fn()
-
+ mockMissingSteps = []
vi.mocked(useTrackEvent).mockReturnValue(mockTrackEvent)
vi.mocked(ConfirmCancelModal).mockReturnValue(
Mock ConfirmCancelModal
@@ -267,6 +272,9 @@ describe('ProtocolRunHeader', () => {
vi.mocked(ConfirmAttachmentModal).mockReturnValue(
mock confirm attachment modal
)
+ vi.mocked(ConfirmMissingStepsModal).mockReturnValue(
+ mock missing steps modal
+ )
when(vi.mocked(useProtocolAnalysisErrors)).calledWith(RUN_ID).thenReturn({
analysisErrors: null,
})
diff --git a/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunSetup.test.tsx b/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunSetup.test.tsx
index c64d00aa534..e4fbc00e234 100644
--- a/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunSetup.test.tsx
+++ b/app/src/organisms/Devices/ProtocolRun/__tests__/ProtocolRunSetup.test.tsx
@@ -40,6 +40,7 @@ import { SetupLiquids } from '../SetupLiquids'
import { SetupModuleAndDeck } from '../SetupModuleAndDeck'
import { EmptySetupStep } from '../EmptySetupStep'
import { ProtocolRunSetup } from '../ProtocolRunSetup'
+import type { MissingSteps } from '../ProtocolRunSetup'
import { useNotifyRunQuery } from '../../../../resources/runs'
import type * as SharedData from '@opentrons/shared-data'
@@ -68,12 +69,18 @@ vi.mock('@opentrons/shared-data', async importOriginal => {
const ROBOT_NAME = 'otie'
const RUN_ID = '1'
const MOCK_PROTOCOL_LIQUID_KEY = { liquids: [] }
+let mockMissingSteps: MissingSteps = []
+const mockSetMissingSteps = vi.fn((missingSteps: MissingSteps) => {
+ mockMissingSteps = missingSteps
+})
const render = () => {
return renderWithProviders(
,
{
i18nInstance: i18n,
@@ -83,6 +90,7 @@ const render = () => {
describe('ProtocolRunSetup', () => {
beforeEach(() => {
+ mockMissingSteps = []
when(vi.mocked(useIsFlex)).calledWith(ROBOT_NAME).thenReturn(false)
when(vi.mocked(useMostRecentCompletedAnalysis))
.calledWith(RUN_ID)
diff --git a/app/src/pages/Devices/ProtocolRunDetails/index.tsx b/app/src/pages/Devices/ProtocolRunDetails/index.tsx
index 6e5501e6abd..82865237d8e 100644
--- a/app/src/pages/Devices/ProtocolRunDetails/index.tsx
+++ b/app/src/pages/Devices/ProtocolRunDetails/index.tsx
@@ -31,7 +31,10 @@ import {
} from '../../../organisms/Devices/hooks'
import { ProtocolRunHeader } from '../../../organisms/Devices/ProtocolRun/ProtocolRunHeader'
import { RunPreview } from '../../../organisms/RunPreview'
-import { ProtocolRunSetup } from '../../../organisms/Devices/ProtocolRun/ProtocolRunSetup'
+import {
+ ProtocolRunSetup,
+ initialMissingSteps,
+} from '../../../organisms/Devices/ProtocolRun/ProtocolRunSetup'
import { BackToTopButton } from '../../../organisms/Devices/ProtocolRun/BackToTopButton'
import { ProtocolRunModuleControls } from '../../../organisms/Devices/ProtocolRun/ProtocolRunModuleControls'
import { ProtocolRunRuntimeParameters } from '../../../organisms/Devices/ProtocolRun/ProtocolRunRunTimeParameters'
@@ -137,7 +140,6 @@ export function ProtocolRunDetails(): JSX.Element | null {
React.useEffect(() => {
dispatch(fetchProtocols())
}, [dispatch])
-
return robot != null ? (
+ >(initialMissingSteps())
+
const makeHandleScrollToStep = (i: number) => () => {
listRef.current?.scrollToIndex(i, true, -1 * JUMP_OFFSET_FROM_TOP_PX)
}
@@ -207,6 +213,8 @@ function PageContents(props: PageContentsProps): JSX.Element {
protocolRunHeaderRef={protocolRunHeaderRef}
robotName={robotName}
runId={runId}
+ setMissingSteps={setMissingSteps}
+ missingSteps={missingSteps}
/>
),
backToTop: (
@@ -248,12 +256,16 @@ function PageContents(props: PageContentsProps): JSX.Element {
backToTop: null,
},
}
-
- const tabDetails = protocolRunDetailsContentByTab[protocolRunDetailsTab] ?? (
- // default to the setup tab if no tab or nonexistent tab is passed as a param
-
-
- )
+ console.log(`run details tab is ${protocolRunDetailsTab}`)
+ const tabDetails = protocolRunDetailsContentByTab[
+ protocolRunDetailsTab
+ ] ?? // default to the setup tab if no tab or nonexistent tab is passed as a param
+ {
+ content: (
+
+ ),
+ backToTop: null,
+ }
const { content, backToTop } = tabDetails
return (
@@ -263,6 +275,7 @@ function PageContents(props: PageContentsProps): JSX.Element {
robotName={robotName}
runId={runId}
makeHandleJumpToStep={makeHandleJumpToStep}
+ missingSetupSteps={missingSteps}
/>