-
Story
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
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