@@ -212,6 +212,7 @@ describe('ManagedResources - Edit Resource', () => {
212212 const fakeUseHandleResourcePatch : typeof useHandleResourcePatch = ( ) => {
213213 patchHandlerCreated = true ;
214214 return async ( item : any ) => {
215+ cy . log ( 'Patch handler called!' ) ;
215216 patchCalled = true ;
216217 patchedItem = item ;
217218 return true ;
@@ -316,15 +317,27 @@ describe('ManagedResources - Edit Resource', () => {
316317 cy . contains ( 'test-subaccount' ) . should ( 'be.visible' ) ;
317318
318319 // Verify patch not called yet
319- cy . then ( ( ) => cy . wrap ( patchCalled ) . should ( 'equal' , false ) ) ;
320+ cy . then ( ( ) => {
321+ cy . log ( `patchCalled before Apply: ${ patchCalled } ` ) ;
322+ cy . wrap ( patchCalled ) . should ( 'equal' , false ) ;
323+ } ) ;
320324
321325 // Click Apply button
322326 cy . contains ( 'Apply changes' ) . click ( ) ;
323327
324- // Confirm in dialog
328+ // Wait for dialog and confirm
329+ cy . get ( 'ui5-dialog' , { timeout : 10000 } ) . should ( 'exist' ) ;
325330 cy . contains ( 'Yes' ) . click ( { force : true } ) ;
326331
332+ // Give it time to process
333+ cy . wait ( 2000 ) ;
334+
327335 // Verify patch was called
336+ cy . then ( ( ) => {
337+ cy . log ( `patchCalled after Apply: ${ patchCalled } ` ) ;
338+ cy . log ( `patchedItem: ${ JSON . stringify ( patchedItem ) } ` ) ;
339+ } ) ;
340+
328341 cy . then ( ( ) => cy . wrap ( patchCalled ) . should ( 'equal' , true ) ) ;
329342 cy . then ( ( ) => cy . wrap ( patchedItem ) . should ( 'not.be.null' ) ) ;
330343 } ) ;
0 commit comments