File tree Expand file tree Collapse file tree 2 files changed +24
-4
lines changed
app/src/molecules/UpdateBanner Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,21 @@ describe('Module Update Banner', () => {
123
123
expect ( screen . queryByText ( 'Setup module' ) ) . not . toBeInTheDocument ( )
124
124
} )
125
125
126
+ it ( 'should not render module setup banner if pipette calibration is required' , ( ) => {
127
+ props = {
128
+ ...props ,
129
+ updateType : 'setup' ,
130
+ calibratePipetteRequired : true ,
131
+ }
132
+ render ( props )
133
+ expect (
134
+ screen . queryByLabelText (
135
+ 'ModuleCard_calibration_update_banner_test_number'
136
+ )
137
+ ) . not . toBeInTheDocument ( )
138
+ expect ( screen . queryByText ( 'Setup module' ) ) . not . toBeInTheDocument ( )
139
+ } )
140
+
126
141
it ( 'should not render a module setup link if pipette firmware update is required' , ( ) => {
127
142
props = {
128
143
...props ,
Original file line number Diff line number Diff line change @@ -52,13 +52,13 @@ export const UpdateBanner = ({
52
52
}
53
53
54
54
const canProceed =
55
- updateType === 'calibration'
56
- ? ! isEstopNotDisengaged &&
55
+ updateType === 'firmware'
56
+ ? true
57
+ : ! isEstopNotDisengaged &&
57
58
! isTooHot &&
58
59
! attachPipetteRequired &&
59
60
! calibratePipetteRequired &&
60
61
! updatePipetteFWRequired
61
- : true
62
62
63
63
const getMessage = ( ) : string => {
64
64
switch ( updateType ) {
@@ -81,7 +81,12 @@ export const UpdateBanner = ({
81
81
82
82
const isFlex = useIsFlex ( robotName )
83
83
// Only show banner for needing firmware update if robot is an OT-2
84
- if ( ! isFlex && updateType !== 'firmware' ) return null
84
+ if ( ! isFlex && updateType !== 'firmware' ) {
85
+ return null
86
+ }
87
+ if ( updateType === 'setup' && ! canProceed ) {
88
+ return null
89
+ }
85
90
return (
86
91
< Flex
87
92
data-testid = { `ModuleCard_${ updateType } _update_banner_${ serialNumber } ` }
You can’t perform that action at this time.
0 commit comments