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