@@ -45,22 +45,32 @@ describe('CommTrackr Backend Initialization', () => {
4545 admin : [ 2 ]
4646 } ,
4747 } ,
48- fields : [ 'text' , 'number' , 'date' , 'textarea' , 'checkbox' , 'radio' , 'select' ] . flatMap ( fieldType => [
48+ fields : [ 'text' , 'number' , 'date' , 'textarea' , 'checkbox' , 'radio' , 'select' , 'multiselect' ] . flatMap ( fieldType => [
4949 {
5050 id : `test-${ fieldType } ` ,
5151 type : fieldType ,
5252 label : fieldType ,
5353 description : 'description' ,
5454 placeholder : 'placeholder' ,
55- required : false
55+ required : false ,
56+ options : ( ( fieldType === 'radio' ) || fieldType . includes ( 'select' ) ) ? [
57+ { label : 'Option 1' , value : 'option1' } ,
58+ { label : 'Option 2' , value : 'option2' } ,
59+ { label : 'Option 3' , value : 'option3' }
60+ ] : [ ]
5661 } ,
5762 {
5863 id : `test-${ fieldType } -required` ,
5964 type : fieldType ,
6065 label : fieldType ,
6166 description : 'description' ,
6267 placeholder : 'placeholder' ,
63- required : true
68+ required : true ,
69+ options : ( ( fieldType === 'radio' ) || fieldType . includes ( 'select' ) ) ? [
70+ { label : 'Option 1' , value : 'option1' } ,
71+ { label : 'Option 2' , value : 'option2' } ,
72+ { label : 'Option 3' , value : 'option3' }
73+ ] : [ ]
6474 }
6575 ] ) ,
6676 handlers : {
0 commit comments