@@ -28,6 +28,18 @@ async function getSampleStructureDefinition(apiHelpers: ApiHelpers) {
2828 ( { assetLibraryKey} ) => assetLibraryKey === 'Default'
2929 ) . externalReferenceCode ;
3030
31+ const listTypeDefinition =
32+ await apiHelpers . listTypeAdmin . postRandomListTypeDefinition ( ) ;
33+
34+ for ( const option of [ 'Banana' , 'Apple' ] ) {
35+ await apiHelpers . listTypeAdmin . postListTypeEntry ( {
36+ key : option ,
37+ listTypeDefinitionExternalReferenceCode :
38+ listTypeDefinition . externalReferenceCode ,
39+ name_i18n : { en_US : option } ,
40+ } ) ;
41+ }
42+
3143 const SAMPLE_STRUCTURE_DEFINITION : ObjectDefinition = {
3244 enableComments : true ,
3345 enableFriendlyURLCustomization : true ,
@@ -107,6 +119,22 @@ async function getSampleStructureDefinition(apiHelpers: ApiHelpers) {
107119 objectFieldSettings : [ ] ,
108120 required : false ,
109121 } ,
122+ {
123+ DBType : 'String' ,
124+ businessType : 'Picklist' ,
125+ externalReferenceCode : '8f678eeb-ac9b-46fd-85e5-f3541dbc8385' ,
126+ indexed : true ,
127+ indexedAsKeyword : false ,
128+ label : {
129+ en_US : 'Picklist' ,
130+ } ,
131+ listTypeDefinitionExternalReferenceCode :
132+ listTypeDefinition . externalReferenceCode ,
133+ listTypeDefinitionId : listTypeDefinition . id ,
134+ localized : true ,
135+ name : 'picklist' ,
136+ required : false ,
137+ } ,
110138 ] ,
111139 objectFolderExternalReferenceCode : 'L_CMS_CONTENT_STRUCTURES' ,
112140 objectRelationships : [ ] ,
@@ -167,6 +195,7 @@ test(
167195 { label : 'Long Text' , value : 'This is a fruit' } ,
168196 { label : 'Date' , value : '2025-08-08' } ,
169197 { label : 'Boolean' , type : 'Checkbox' , value : true } ,
198+ { label : 'Picklist' , type : 'Picklist' , value : 'Banana' } ,
170199 ] ) ;
171200
172201 await contentsPage . saveContent ( ) ;
@@ -191,6 +220,9 @@ test(
191220 await expect ( page . getByLabel ( 'Boolean' ) . first ( ) ) . toHaveAttribute (
192221 'readonly'
193222 ) ;
223+ await expect ( page . getByLabel ( 'Picklist' ) . first ( ) ) . toHaveAttribute (
224+ 'readonly'
225+ ) ;
194226
195227 await expect ( page . getByLabel ( 'Title' ) . nth ( 1 ) ) . not . toHaveAttribute (
196228 'readonly'
@@ -204,6 +236,9 @@ test(
204236 await expect ( page . getByLabel ( 'Boolean' ) . nth ( 1 ) ) . not . toHaveAttribute (
205237 'readonly'
206238 ) ;
239+ await expect ( page . getByLabel ( 'Picklist' ) . nth ( 1 ) ) . not . toHaveAttribute (
240+ 'readonly'
241+ ) ;
207242
208243 // Change right side language and translate
209244
@@ -218,6 +253,7 @@ test(
218253 { label : 'Long Text' , nth : 1 , value : 'This is a vegetable' } ,
219254 { label : 'Date' , nth : 1 , value : '2025-08-15' } ,
220255 { label : 'Boolean' , nth : 1 , type : 'Checkbox' , value : false } ,
256+ { label : 'Picklist' , nth : 1 , type : 'Picklist' , value : 'Apple' } ,
221257 ] ) ;
222258
223259 // Change left side language and check it shows persisted values
@@ -235,6 +271,8 @@ test(
235271
236272 await expect ( page . getByLabel ( 'Date' ) . first ( ) ) . toHaveValue ( '2025-08-08' ) ;
237273
274+ await expect ( page . getByLabel ( 'Picklist' ) . first ( ) ) . toHaveValue ( 'Banana' ) ;
275+
238276 // Save and check translation is persisted
239277
240278 await contentsPage . saveContent ( ) ;
@@ -246,5 +284,7 @@ test(
246284 await localizationSelectPage . switchLanguage ( 'es-ES' ) ;
247285
248286 await expect ( page . getByLabel ( 'Title' ) ) . toHaveValue ( spanishTitle ) ;
287+
288+ await expect ( page . getByLabel ( 'Picklist' ) ) . toHaveValue ( 'Apple' ) ;
249289 }
250290) ;
0 commit comments