From ef21f79e2831eba57b3eb29bda1bba3088af37ed Mon Sep 17 00:00:00 2001 From: Robb Hamilton Date: Wed, 15 Apr 2026 11:11:27 -0400 Subject: [PATCH] OCPBUGS-83532: Fix race condition in CRD Cypress test The customresourcedefinition.cy.ts test was failing intermittently due to a race condition. After clicking "View instances" via the kebab menu, the test immediately attempted to click the "Create YAML" button without waiting for navigation to complete. This fix adds two synchronization points: 1. URL validation to ensure navigation completed 2. Page load check to ensure the Create button is visible This eliminates the race condition and stabilizes the test. Co-Authored-By: Claude Sonnet 4.5 --- .../integration-tests/tests/crud/customresourcedefinition.cy.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/packages/integration-tests/tests/crud/customresourcedefinition.cy.ts b/frontend/packages/integration-tests/tests/crud/customresourcedefinition.cy.ts index eed39497a50..5753531da2a 100644 --- a/frontend/packages/integration-tests/tests/crud/customresourcedefinition.cy.ts +++ b/frontend/packages/integration-tests/tests/crud/customresourcedefinition.cy.ts @@ -99,6 +99,8 @@ describe('CustomResourceDefinitions', () => { listPage.isCreateButtonVisible(); listPage.dvRows.shouldBeLoaded(); listPage.dvRows.clickKebabAction(`CRD${testName}`, 'View instances'); + cy.url().should('include', `/k8s/all-namespaces/test.example.com~v1~CRD${testName}`); + listPage.isCreateButtonVisible(); listPage.clickCreateYAMLbutton(); yamlEditor.isLoaded(); yamlEditor.getEditorContent().then((content) => {