Skip to content

Commit 4f1b670

Browse files
adding logs - tests are ok locally
1 parent ac93058 commit 4f1b670

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

src/components/ControlPlane/ManagedResources.cy.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)