Skip to content

Commit ef21f79

Browse files
rhamiltoclaude
andcommitted
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 <noreply@anthropic.com>
1 parent 6a8db8b commit ef21f79

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

frontend/packages/integration-tests/tests/crud/customresourcedefinition.cy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ describe('CustomResourceDefinitions', () => {
9999
listPage.isCreateButtonVisible();
100100
listPage.dvRows.shouldBeLoaded();
101101
listPage.dvRows.clickKebabAction(`CRD${testName}`, 'View instances');
102+
cy.url().should('include', `/k8s/all-namespaces/test.example.com~v1~CRD${testName}`);
103+
listPage.isCreateButtonVisible();
102104
listPage.clickCreateYAMLbutton();
103105
yamlEditor.isLoaded();
104106
yamlEditor.getEditorContent().then((content) => {

0 commit comments

Comments
 (0)