Skip to content

Commit

Permalink
fix(app): disable view error details button if run is cancelled witho…
Browse files Browse the repository at this point in the history
…ut ER (#16118)

closes [RQA-3088](https://opentrons.atlassian.net/browse/RQA-3088)
when a run is cancelled without ER we need to disable the button.
currently working on desktop app but not on odd.

# Overview

enable button if the command errors are not as a result of a cancel run.

## Test Plan and Hands on Testing

- [x] explanation in ticket

## Risk assessment

low.


[RQA-3088]:
https://opentrons.atlassian.net/browse/RQA-3088?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
  • Loading branch information
TamarZanzouri authored Aug 26, 2024
1 parent 469a13d commit 55b5d69
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/pages/RunSummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,14 @@ export function RunSummary(): JSX.Element {
isRunCurrent,
}
)

// TODO(jh, 08-14-24): The backend never returns the "user cancelled a run" error and cancelledWithoutRecovery becomes unnecessary.
const cancelledWithoutRecovery =
!enteredER && runStatus === RUN_STATUS_STOPPED
const hasCommandErrors =
commandErrorList != null && commandErrorList.data.length > 0
const disableErrorDetailsBtn = !(
hasCommandErrors ||
(hasCommandErrors && !cancelledWithoutRecovery) ||
(runRecord?.data.errors != null && runRecord?.data.errors.length > 0)
)

Expand Down

0 comments on commit 55b5d69

Please sign in to comment.