Uploaded image for project: 'Red Hat Advanced Cluster Security'
  1. Red Hat Advanced Cluster Security
  2. ROX-31808

[Testing] Create Cypress tests for add/remove base image flows

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Minor Minor
    • 4.10.0
    • None
    • None
    • None
    • Rox Sprint 4.10G

      Create comprehensive E2E tests for the base images management modal covering both happy paths and error scenarios.

      Test Coverage:

      Happy Path Tests (with real backend):
      1. Add base image flow:

      • Navigate to Results page
      • Open "Manage images" dropdown
      • Click "Base images" option
      • Enter valid base image path (e.g., docker.io/library/ubuntu:22.04)
      • Submit form and wait for scan completion
      • Verify success alert shows with normalized name
      • Verify image appears in table with correct "Added by" user

      2. Remove base image flow:

      • Open Base Images modal
      • Click "Remove from list" on a base image
      • Verify success alert appears
      • Verify image removed from table
      • Verify list refetches and updates

      Error Scenarios (with mocked APIs):
      3. Test all error types:

      • INVALID_IMAGE_NAME - malformed image path
      • NO_VALID_INTEGRATION - no registry integration
      • SCAN_FAILED - scan error
      • DUPLICATE_PATTERN - pattern already exists
      • Verify appropriate error messages display
      • Verify modal stays open for retry
      • Verify form re-enables after error

      Acceptance Criteria:

      • All happy path tests pass with real backend
      • All error scenarios covered with mocked responses
      • Tests are stable and don't flake
      • Retry behavior validated (modal stays open, form re-enables)

              schaudhr Saif Chaudhry
              schaudhr Saif Chaudhry
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: