@@ -37,7 +37,7 @@ const MOCK_CATALOG = {
3737 supported_input_types : [ 'text' ] ,
3838 supported_output_types : [ 'text' ] ,
3939 parameters : [
40- { name : 'caesar_offset' , type_name : 'int' , required : true , default_value : null , choices : null , description : 'Offset value.' } ,
40+ { name : 'caesar_offset' , type_name : 'int' , required : true , default : null , choices : null , description : 'Offset value.' } ,
4141 ] ,
4242 is_llm_based : false ,
4343 description : 'Caesar cipher encoding.' ,
@@ -63,7 +63,7 @@ const MOCK_CATALOG = {
6363 supported_input_types : [ 'text' ] ,
6464 supported_output_types : [ 'text' ] ,
6565 parameters : [
66- { name : 'uppercase' , type_name : 'bool' , required : false , default_value : 'false' , choices : null , description : 'Use uppercase.' } ,
66+ { name : 'uppercase' , type_name : 'bool' , required : false , default : 'false' , choices : null , description : 'Use uppercase.' } ,
6767 ] ,
6868 is_llm_based : false ,
6969 description : 'Bool param test.' ,
@@ -73,7 +73,7 @@ const MOCK_CATALOG = {
7373 supported_input_types : [ 'text' ] ,
7474 supported_output_types : [ 'text' ] ,
7575 parameters : [
76- { name : 'mode' , type_name : 'str' , required : false , default_value : 'fast' , choices : [ 'fast' , 'slow' ] , description : 'Speed mode.' } ,
76+ { name : 'mode' , type_name : 'str' , required : false , default : 'fast' , choices : [ 'fast' , 'slow' ] , description : 'Speed mode.' } ,
7777 ] ,
7878 is_llm_based : false ,
7979 description : 'Choice param test.' ,
@@ -83,7 +83,7 @@ const MOCK_CATALOG = {
8383 supported_input_types : [ 'text' ] ,
8484 supported_output_types : [ 'text' ] ,
8585 parameters : [
86- { name : 'template_file_path' , type_name : 'str' , required : false , default_value : null , choices : null , description : 'Path to template.' } ,
86+ { name : 'template_file_path' , type_name : 'str' , required : false , default : null , choices : null , description : 'Path to template.' } ,
8787 ] ,
8888 is_llm_based : false ,
8989 description : 'File path param test.' ,
@@ -773,7 +773,7 @@ describe('ConverterPanel edge cases', () => {
773773 expect ( screen . getByTestId ( 'converter-tab-custom_type' ) ) . toBeInTheDocument ( )
774774 } )
775775
776- it ( 'handles converters with Optional[ bool] param type ' , async ( ) => {
776+ it ( 'handles optional bool params (rendered as a bool Switch) ' , async ( ) => {
777777 const catalogWithOptionalBool = {
778778 items : [
779779 ...MOCK_CATALOG . items ,
@@ -782,7 +782,7 @@ describe('ConverterPanel edge cases', () => {
782782 supported_input_types : [ 'text' ] ,
783783 supported_output_types : [ 'text' ] ,
784784 parameters : [
785- { name : 'flag' , type_name : 'Optional[ bool] ' , required : false , default_value : 'true' , choices : null , description : 'Optional bool.' } ,
785+ { name : 'flag' , type_name : 'bool' , required : false , default : 'true' , choices : null , description : 'Optional bool.' } ,
786786 ] ,
787787 is_llm_based : false ,
788788 description : 'Optional bool param test.' ,
@@ -795,7 +795,7 @@ describe('ConverterPanel edge cases', () => {
795795 await waitForList ( )
796796 await openComboboxAndSelect ( 'OptBoolConverter' )
797797
798- // Should render a Switch (not a text input) for Optional[bool] (line 410-416)
798+ // An Optional[bool] constructor param surfaces as type_name 'bool', so it renders a Switch (not a text input).
799799 const switchEl = screen . getByTestId ( 'param-flag' )
800800 expect ( switchEl ) . toBeInTheDocument ( )
801801 } )
@@ -808,7 +808,7 @@ describe('ConverterPanel edge cases', () => {
808808 supported_input_types : [ 'text' ] ,
809809 supported_output_types : [ 'text' ] ,
810810 parameters : [
811- { name : 'config_file_path' , type_name : 'str' , required : true , default_value : null , choices : null , description : 'Config file path.' } ,
811+ { name : 'config_file_path' , type_name : 'str' , required : true , default : null , choices : null , description : 'Config file path.' } ,
812812 ] ,
813813 is_llm_based : true ,
814814 description : 'Required file param test.' ,
0 commit comments