@@ -112,7 +112,7 @@ describe('Pi Create PR Babysit surface', () => {
112112 condition : {
113113 field : 'mode' ,
114114 value : 'cloud' ,
115- and : { field : 'babysitMode' , value : true } ,
115+ and : { field : 'babysitMode' , value : [ true , 'true' ] } ,
116116 } ,
117117 } )
118118 expect ( mentions ) . toMatchObject ( {
@@ -122,12 +122,12 @@ describe('Pi Create PR Babysit surface', () => {
122122 required : {
123123 field : 'mode' ,
124124 value : 'cloud' ,
125- and : { field : 'babysitMode' , value : true } ,
125+ and : { field : 'babysitMode' , value : [ true , 'true' ] } ,
126126 } ,
127127 condition : {
128128 field : 'mode' ,
129129 value : 'cloud' ,
130- and : { field : 'babysitMode' , value : true } ,
130+ and : { field : 'babysitMode' , value : [ true , 'true' ] } ,
131131 } ,
132132 } )
133133 for ( const output of [
@@ -142,7 +142,7 @@ describe('Pi Create PR Babysit surface', () => {
142142 condition : {
143143 field : 'mode' ,
144144 value : 'cloud' ,
145- and : { field : 'babysitMode' , value : true } ,
145+ and : { field : 'babysitMode' , value : [ true , 'true' ] } ,
146146 } ,
147147 } )
148148 }
@@ -161,6 +161,15 @@ describe('Pi Create PR Babysit surface', () => {
161161 expect ( evaluateSubBlockCondition ( draft ?. condition , { mode : 'cloud' , babysitMode : true } ) ) . toBe (
162162 false
163163 )
164+ expect (
165+ evaluateSubBlockCondition ( draft ?. condition , { mode : 'cloud' , babysitMode : 'true' } )
166+ ) . toBe ( false )
167+ expect (
168+ evaluateSubBlockCondition (
169+ PiBlock . subBlocks . find ( ( subBlock ) => subBlock . id === 'reviewMentions' ) ?. condition ,
170+ { mode : 'cloud' , babysitMode : 'true' }
171+ )
172+ ) . toBe ( true )
164173 expect ( evaluateSubBlockCondition ( skills ?. condition , { mode : 'cloud' } ) ) . toBe ( true )
165174 expect ( evaluateSubBlockCondition ( tools ?. condition , { mode : 'cloud' } ) ) . toBe ( false )
166175 expect ( evaluateSubBlockCondition ( memory ?. condition , { mode : 'cloud' } ) ) . toBe ( true )
0 commit comments