fix(ui): stabilize GCR image integration E2E test by davdhacs · Pull Request #21337 · stackrox/stackrox · GitHub
Skip to content

fix(ui): stabilize GCR image integration E2E test#21337

Draft
davdhacs wants to merge 2 commits into
davdhacs/ui-e2efrom
davdhacs/fix-image-integrations-flake
Draft

fix(ui): stabilize GCR image integration E2E test#21337
davdhacs wants to merge 2 commits into
davdhacs/ui-e2efrom
davdhacs/fix-image-integrations-flake

Conversation

@davdhacs

Copy link
Copy Markdown
Contributor

Description

The integrations/imageIntegrations.test E2E test has a consistently failing assertion for the Google Container Registry (GCR) test case. The test asserts cy.get('[data-testid="add-integration"]').should('not.exist') immediately after visitIntegrationsTable without waiting for GCR-specific content to render.

On GKE with higher network latency, the page may not have fully settled before the assertion runs. The <a> button element (rendered as a.pf-v6-c-button.pf-m-primary) is found in the DOM within the 8s timeout, causing consistent failure.

The fix adds a preceding assertion that waits for the GCR-specific deprecation notice alert to appear before asserting the button's absence. This ensures the React component has rendered with the correct route props (type='google', isCreationDisabled=true) before checking.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • modified existing tests

How I validated my change

The fix adds a gate assertion that waits for the GCR deprecation notice (cy.get('.pf-v6-c-alert:contains("Deprecation notice")').should('exist')) before checking button absence. This is a standard Cypress pattern for ensuring page state before negative assertions. Will validate on the next GKE E2E run.

The GCR test asserts that the "New integration" button does not exist,
but does so immediately after page visit without waiting for GCR-specific
content to render. On GKE with higher latency, the page may not have
fully settled before the assertion runs, causing a consistent failure.

Wait for the GCR-specific deprecation notice alert before asserting the
button's absence.

AI-assisted.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@openshift-ci

openshift-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 073e9ba2-d721-4167-b1ba-95120d9bcf93

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch davdhacs/fix-image-integrations-flake

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

The previous fix waited for a deprecation notice alert that may not be
rendered in time. Wait for the IntegrationsTable "results found" h2
instead, which confirms the table component (and its button visibility
logic) has rendered.

AI-assisted change.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
davdhacs added a commit that referenced this pull request Jun 23, 2026
Test fixes belong in their own PRs (#21337, #21338, #21341) and
should not be merged into the ui-e2e workflow PR.

Partially generated by AI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant