From 7be2940c6e73ee665a7690cddf702f773670a7ad Mon Sep 17 00:00:00 2001 From: Robb Hamilton Date: Mon, 20 Apr 2026 13:27:47 -0400 Subject: [PATCH] OCPBUGS-83813: Fix race conditions in debug pod Cypress tests The test "Opens debug terminal page from Pods Page - Status tool tip" fails intermittently because the PatternFly Popover re-renders asynchronously after opening, causing the debug link element to detach from the DOM before Cypress can click it. This fix adds proper wait conditions to ensure the popover content is stable and visible before attempting to click the debug link. The same fix is applied to the similar test on the Pod Details page. Co-Authored-By: Claude Sonnet 4.5 --- .../packages/integration-tests/tests/app/debug-pod.cy.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/packages/integration-tests/tests/app/debug-pod.cy.ts b/frontend/packages/integration-tests/tests/app/debug-pod.cy.ts index 65f75b34bc2..0ec3555f84c 100644 --- a/frontend/packages/integration-tests/tests/app/debug-pod.cy.ts +++ b/frontend/packages/integration-tests/tests/app/debug-pod.cy.ts @@ -68,6 +68,9 @@ describe('Debug pod', () => { cy.visit(`/k8s/ns/${testName}/pods/${POD_NAME}`); detailsPage.isLoaded(); cy.byTestID('popover-status-button', { timeout: 60000 }).click(); + // Regression test for OCPBUGS-83813: Wait for popover content to be stable before clicking + // https://issues.redhat.com/browse/OCPBUGS-83813 + cy.byTestID(`popup-debug-container-link-${CONTAINER_NAME}`).should('be.visible'); cy.byTestID(`popup-debug-container-link-${CONTAINER_NAME}`).click(); listPage.titleShouldHaveText(`Debug ${CONTAINER_NAME}`); cy.get(XTERM_CLASS).should('exist'); @@ -79,8 +82,9 @@ describe('Debug pod', () => { cy.visit(`/k8s/ns/${testName}/pods`); listPage.dvRows.shouldExist(POD_NAME); listPage.dvRows.clickStatusButton(POD_NAME); - // Click on first debug link - cy.byTestID(`popup-debug-container-link-${CONTAINER_NAME}`).click(); + // Regression test for OCPBUGS-83813: Wait for popover content to be stable before clicking + // https://issues.redhat.com/browse/OCPBUGS-83813 + cy.byTestID(`popup-debug-container-link-${CONTAINER_NAME}`).should('be.visible').click(); listPage.titleShouldHaveText(`Debug ${CONTAINER_NAME}`); cy.get(XTERM_CLASS).should('exist');