🔮 Vision AI Test Suite

Test the Vision AI feature for LaporWarga

1. Configuration Check Required

Verify that Vision AI configuration file exists and is properly set up.

  • config/vision.example.php exists (template)
  • Copy to config/vision.php
  • Add OpenAI API key to config/vision.php
  • Verify .gitignore includes config/vision.php
⚠️ Important: You need a valid OpenAI API key with Vision API access (gpt-4o-mini or gpt-4o).

2. File Upload Validation Required

Test file type and size validation.

3. Vision AI API Test Optional

Test the actual Vision AI endpoint with a real image.

4. UI Integration Check Required

Verify that Vision AI is properly integrated in the report form.

  • Photo upload field is required
  • Helper text appears under photo upload
  • Vision AI button appears after photo selection
  • Button is disabled until photo is selected
  • Description textarea is editable after AI generation
  • Submit button works normally

5. Security Checklist Required

  • config/vision.php is in .gitignore
  • API key not exposed in frontend
  • File type validation enforced
  • File size limit enforced (5MB)
  • Output is sanitized with htmlspecialchars()
  • Manual trigger only (no auto-submit)
  • User can edit AI results