diff --git a/app/src/organisms/RunProgressMeter/__tests__/RunProgressMeter.test.tsx b/app/src/organisms/RunProgressMeter/__tests__/RunProgressMeter.test.tsx index d0f36f5405c..d3cf0dee8f7 100644 --- a/app/src/organisms/RunProgressMeter/__tests__/RunProgressMeter.test.tsx +++ b/app/src/organisms/RunProgressMeter/__tests__/RunProgressMeter.test.tsx @@ -6,7 +6,11 @@ import { useCommandQuery, useRunQuery, } from '@opentrons/react-api-client' -import { RUN_STATUS_IDLE, RUN_STATUS_RUNNING } from '@opentrons/api-client' +import { + RUN_STATUS_IDLE, + RUN_STATUS_RUNNING, + RUN_STATUS_SUCCEEDED, +} from '@opentrons/api-client' import { i18n } from '../../../i18n' import { InterventionModal } from '../../InterventionModal' @@ -143,4 +147,11 @@ describe('RunProgressMeter', () => { const { findByText } = render(props) expect(await findByText('MOCK INTERVENTION MODAL')).toBeTruthy() }) + + it('should render the correct run status when run status is completed', () => { + mockUseCommandQuery.mockReturnValue({ data: null } as any) + mockUseRunStatus.mockReturnValue(RUN_STATUS_SUCCEEDED) + const { getByText } = render(props) + getByText('Protocol completed') + }) }) diff --git a/app/src/organisms/RunProgressMeter/index.tsx b/app/src/organisms/RunProgressMeter/index.tsx index 84b7cb33370..94e06dd2ed1 100644 --- a/app/src/organisms/RunProgressMeter/index.tsx +++ b/app/src/organisms/RunProgressMeter/index.tsx @@ -132,7 +132,9 @@ export function RunProgressMeter(props: RunProgressMeterProps): JSX.Element { ) } else if ( analysis != null && - analysisCommands[lastRunAnalysisCommandIndex] != null + analysisCommands[lastRunAnalysisCommandIndex] != null && + runStatus != null && + !TERMINAL_RUN_STATUSES.includes(runStatus) ) { currentStepContents = (