@@ -130,28 +130,55 @@ describe('FSXAProxyAPIRemoteProjects should resolve references', () => {
130130 md_dataset : datasetReference ,
131131 }
132132
133- await caasClient . addItemsToCollection ( [ localMedia ] , projectLocale )
133+ const localMediaRes = await caasClient . addItemsToCollection (
134+ [ localMedia ] ,
135+ projectLocale
136+ )
137+ // DIAGNOSTIC: temporary, remove after root-causing CAAS-2680 flakiness
138+ console . log (
139+ `[diag] addItemsToCollection(localMedia) -> ${ localMediaRes . status } ${ await localMediaRes . clone ( ) . text ( ) } `
140+ )
134141
135142 const [ language , country ] = remoteProjectLocale . split ( '_' )
136143
137144 // add items to remote project collection
138- await caasClient . addItemsToRemoteCollection ( [ remoteMedia , dataset ] , {
139- language,
140- country,
141- identifier : remoteProjectLocale ,
142- } )
145+ const remoteMediaRes = await caasClient . addItemsToRemoteCollection (
146+ [ remoteMedia , dataset ] ,
147+ {
148+ language,
149+ country,
150+ identifier : remoteProjectLocale ,
151+ }
152+ )
153+ // DIAGNOSTIC: temporary, remove after root-causing CAAS-2680 flakiness
154+ console . log (
155+ `[diag] addItemsToRemoteCollection(remoteMedia,dataset) -> ${ remoteMediaRes ?. status } ${ await remoteMediaRes ?. clone ( ) . text ( ) } `
156+ )
143157
144158 pageRef . page . formData = {
145159 pt_pictureLocal : pictureLocal ,
146160 pt_pictureRemote : pictureRemote ,
147161 }
148162
149- await caasClient . addItemsToCollection ( [ pageRef ] , projectLocale )
163+ const pageRefRes = await caasClient . addItemsToCollection (
164+ [ pageRef ] ,
165+ projectLocale
166+ )
167+ // DIAGNOSTIC: temporary, remove after root-causing CAAS-2680 flakiness
168+ console . log (
169+ `[diag] addItemsToCollection(pageRef) -> ${ pageRefRes . status } ${ await pageRefRes . clone ( ) . text ( ) } `
170+ )
150171
151172 // Wait for CaaS to propagate all data before tests run
173+ let pollAttempt = 0
152174 await waitUntilPreconditionMet (
153175 async ( ) => {
176+ pollAttempt ++
154177 const res = await caasClient . getItem ( pageRef . identifier , 'de_DE' )
178+ // DIAGNOSTIC: temporary, remove after root-causing CAAS-2680 flakiness
179+ console . log (
180+ `[diag] poll #${ pollAttempt } getItem(pageRef=${ pageRef . identifier } ) -> ${ res . status } `
181+ )
155182 return res . status === 200
156183 } ,
157184 {
0 commit comments