File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,10 @@ const dynamicInternalJsfAttrs = [
2424 'calculateConditionalProperties' , // driven from conditionals
2525 'calculateCustomValidationProperties' , // To be deprecated in favor of json-logic
2626 'scopedJsonSchema' , // The respective JSON Schema
27- 'Component' , // HOTFIX/TODO Internal customizations, check test conditions.test.js for more info.
27+
28+ // HOTFIX/TODO Internal customizations, check test conditions.test.js for more info.
29+ 'Component' ,
30+ 'calculateDynamicProperties' ,
2831] ;
2932const dynamicInternalJsfAttrsObj = Object . fromEntries (
3033 dynamicInternalJsfAttrs . map ( ( k ) => [ k , true ] )
Original file line number Diff line number Diff line change @@ -396,20 +396,24 @@ describe('Conditional attributes updated', () => {
396396 customProperties : {
397397 salary_period : {
398398 Component : '<A React Component>' ,
399+ calculateDynamicProperties : ( ) => true ,
399400 } ,
400401 } ,
401402 }
402403 ) ;
403404
404405 // It's there by default
405406 expect ( fields [ 1 ] . Component ) . toBe ( '<A React Component>' ) ;
407+ expect ( fields [ 1 ] . calculateDynamicProperties ) . toEqual ( expect . any ( Function ) ) ;
406408
407409 // Given "Yes", it stays there too.
408410 handleValidation ( { is_full_time : 'yes' } ) ;
409411 expect ( fields [ 1 ] . Component ) . toBe ( '<A React Component>' ) ;
412+ expect ( fields [ 1 ] . calculateDynamicProperties ) . toEqual ( expect . any ( Function ) ) ;
410413
411414 // Given "No", it stays there too.
412415 handleValidation ( { is_full_time : 'no' } ) ;
413416 expect ( fields [ 1 ] . Component ) . toBe ( '<A React Component>' ) ;
417+ expect ( fields [ 1 ] . calculateDynamicProperties ) . toEqual ( expect . any ( Function ) ) ;
414418 } ) ;
415419} ) ;
You can’t perform that action at this time.
0 commit comments