Skip to content

[WIP] OCPBUGS-82504: Re-enable cluster-settings/update-modal.cy.ts e2e test disabled for createRoot adoption#16283

Open
cajieh wants to merge 1 commit intoopenshift:mainfrom
cajieh:re-enable-cluster-settings-update-modal
Open

[WIP] OCPBUGS-82504: Re-enable cluster-settings/update-modal.cy.ts e2e test disabled for createRoot adoption#16283
cajieh wants to merge 1 commit intoopenshift:mainfrom
cajieh:re-enable-cluster-settings-update-modal

Conversation

@cajieh
Copy link
Copy Markdown
Contributor

@cajieh cajieh commented Apr 14, 2026

Changes

  • Re-enable "frontend/packages/integration-tests/tests/cluster-settings/update-modal.cy.ts" (remove xdescribe) so the cluster update modal E2E runs again after the React 18 / createRoot migration.

  • Stabilize Cypress commands for concurrent UI: split .should() / .click() where the DOM was updating mid-chain; in views/cluster-settings.ts, wait for the modal and version dropdown to be visible, enabled, and not aria-busy before clicking.

  • Deterministic MachineConfigPool state: add mocks/machine-config-pool.ts with minimal list fixtures (paused vs unpaused worker, stable ordering).

  • cy.intercept the ClusterVersion resource and the MCP list GET (**/machineconfiguration.openshift.io/v1/machineconfigpools?*) so assertions do not depend on live cluster MCP pause state.

  • support/stub-machine-config-pool-watch-ws.ts: in onBeforeLoad, only MachineConfigPool list watch WebSocket URLs are replaced with a no-op socket so watch frames cannot overwrite the intercepted list in Redux (GET intercept alone is insufficient).

  • clusterSettings.detailsIsLoaded(visitOptions?) to pass onBeforeLoad; oc patch mcp/worker uses failOnNonZeroExit: false so optional CLI sync does not fail jobs when MCO/oc is unavailable.

  • WAIT_OPTIONS (requestTimeout: 300000 on cy.wait(@clusterVersion)) aligns with other cluster-settings integration tests and tolerates slow CI before the first ClusterVersion request fires. Not new, could be reduce after observaing the behavior in CI. While not new, this timeout could be reduced after observing CI behavior over time.

Justification

  • Bug driver: The suite was disabled due to flaky E2E after createRoot (DOM updating during interactions) and unreliable reliance on live MCP pause state / oc patch across CI environments.
  • Why intercept: We need fixed ClusterVersion and MCP list payloads to assert modal copy, warnings, and controls consistently (Cypress cy.intercept | Cypress Testing Strategies).
  • Why stub the MCP watch WebSocket: The console client applies list data from HTTP, then merges watch updates over WebSocket; live updates replace mocked list data in Redux before assertions. Scoping a stub to MCP list watch keeps other watches real while making the test deterministic.
  • Why keep E2E: Validates browser-level behavior (routing, modal open, dropdown interaction) that is expensive to reproduce only in jsdom-based unit tests; unit tests can still complement this for pure component logic later.

Screenshot:

Screenshot 2026-04-14 at 9 38 35 AM

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 14, 2026
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 14, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@cajieh: This pull request references Jira Issue OCPBUGS-82504, which is invalid:

  • expected the bug to target either version "5.0." or "openshift-5.0.", but it targets "4.23.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Changes

  • Re-enable frontend/packages/integration-tests/tests/cluster-settings/update-modal.cy.ts (remove xdescribe) so the cluster update modal E2E runs again after the React 18 / createRoot migration.

  • Stabilize Cypress commands for concurrent UI: split .should() / .click() where the DOM was updating mid-chain; in views/cluster-settings.ts, wait for the modal and version dropdown to be visible, enabled, and not aria-busy before clicking.

  • Deterministic MachineConfigPool state: add mocks/machine-config-pool.ts with minimal list fixtures (paused vs unpaused worker, stable ordering).

  • cy.intercept the ClusterVersion resource and the MCP list GET (**/machineconfiguration.openshift.io/v1/machineconfigpools?*) so assertions do not depend on live cluster MCP pause state.

  • support/stub-machine-config-pool-watch-ws.ts: in onBeforeLoad, only MachineConfigPool list watch WebSocket URLs are replaced with a no-op socket so watch frames cannot overwrite the intercepted list in Redux (GET intercept alone is insufficient).

  • clusterSettings.detailsIsLoaded(visitOptions?) to pass onBeforeLoad; oc patch mcp/worker uses failOnNonZeroExit: false so optional CLI sync does not fail jobs when MCO/oc is unavailable.

  • WAIT_OPTIONS (requestTimeout: 300000 on cy.wait(@clusterVersion)) aligns with other cluster-settings integration tests and tolerates slow CI before the first ClusterVersion request fires. Not new, could be reduce after observaing the behavior in CI. While not new, this timeout could be reduced after observing CI behavior over time.

Justification

  • Bug driver: The suite was disabled due to flaky E2E after createRoot (DOM updating during interactions) and unreliable reliance on live MCP pause state / oc patch across CI environments.
  • Why intercept: We need fixed ClusterVersion and MCP list payloads to assert modal copy, warnings, and controls consistently (Cypress cy.intercept).
  • Why stub the MCP watch WebSocket: The console client applies list data from HTTP, then merges watch updates over WebSocket; live updates replace mocked list data in Redux before assertions. Scoping a stub to MCP list watch keeps other watches real while making the test deterministic.
  • Why keep E2E: Validates browser-level behavior (routing, modal open, dropdown interaction) that is expensive to reproduce only in jsdom-based unit tests; unit tests can still complement this for pure component logic later.

Screenshot:

Screenshot 2026-04-14 at 9 38 35 AM

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from Leo6Leo and rhamilto April 14, 2026 20:21
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 14, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cajieh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added kind/cypress Related to Cypress e2e integration testing approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 14, 2026
@cajieh
Copy link
Copy Markdown
Contributor Author

cajieh commented Apr 14, 2026

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@cajieh: This pull request references Jira Issue OCPBUGS-82504, which is invalid:

  • expected the bug to target only the "5.0.0" version, but multiple target versions were set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@cajieh
Copy link
Copy Markdown
Contributor Author

cajieh commented Apr 14, 2026

/jira refresh

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Apr 14, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@cajieh: This pull request references Jira Issue OCPBUGS-82504, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Apr 14, 2026
@rhamilto
Copy link
Copy Markdown
Member

@cajieh, I am hoping 8d84f32 is a simpler fix.

@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 16, 2026
@cajieh cajieh force-pushed the re-enable-cluster-settings-update-modal branch from 99cfe3f to 90a3b5f Compare April 16, 2026 12:18
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 16, 2026
@cajieh
Copy link
Copy Markdown
Contributor Author

cajieh commented Apr 16, 2026

/test e2e-gcp-console

3 similar comments
@cajieh
Copy link
Copy Markdown
Contributor Author

cajieh commented Apr 17, 2026

/test e2e-gcp-console

@cajieh
Copy link
Copy Markdown
Contributor Author

cajieh commented Apr 17, 2026

/test e2e-gcp-console

@cajieh
Copy link
Copy Markdown
Contributor Author

cajieh commented Apr 17, 2026

/test e2e-gcp-console

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 17, 2026

@cajieh: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-console 90a3b5f link true /test e2e-gcp-console

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/cypress Related to Cypress e2e integration testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants