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

[Base Images Mgmt] Write unit tests for BaseImagesForm and BaseImagesTable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Major Major
    • 4.10.0
    • None
    • None
    • None
    • Rox Sprint 4.10E

      Create comprehensive unit tests for the BaseImagesForm and BaseImagesTable components.

      BaseImagesForm Tests:

      • Form validation and submission
      • Displays success/error alerts correctly
      • Disables inputs during submission
      • Error handling for all error types:
      • INVALID_IMAGE_NAME (malformed image path)
      • NO_VALID_INTEGRATION (no registry integration)
      • SCAN_FAILED (scan error from backend)
      • DUPLICATE_PATTERN (pattern already exists)
      • Modal stays open after errors for retry
      • Form re-enables after error
      • Button spinner shows during submission

      BaseImagesTable Tests:

      • Renders the base images list correctly
      • Remove button shows spinner on correct row
      • Disables all buttons during delete operation
      • Shows empty state when no base images available
      • Calls removeBaseImage callback with correct name
      • Displays "Added by" user information correctly

      Acceptance Criteria:

      • All error scenarios covered with test cases
      • Loading states tested
      • Remove button behavior validated
      • Component prop interactions tested

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

                Created:
                Updated: