# 📋 Testing Checklist - Foto Aset

## ✅ Technical Verification (DONE)
- [x] Symlink created: `public/storage` → `storage/app/public` (Junction)
- [x] Folder `aset-photos` accessible via symlink
- [x] 2 foto files found and accessible
- [x] No `Storage::url()` in view files
- [x] All view files using `asset('storage/' . $field)`
- [x] Cache cleared (view, cache, config)

---

## 🧪 Browser Testing (TODO - Manual)

### 1. Halaman Index/Daftar Aset
URL: `http://localhost/simaju/aset`

**Check:**
- [ ] Foto aset muncul dengan benar (56x56px, rounded)
- [ ] Foto tidak pecah/broken
- [ ] Alt text menampilkan nama aset yang benar
- [ ] Placeholder muncul untuk aset tanpa foto (icon box dengan gradient)
- [ ] Hover effect bekerja pada foto

**Expected:**
```
AST-001 - Microsoft: Foto muncul ✓
AST-002 - Microsoft: Foto muncul ✓
```

---

### 2. Halaman Detail Aset
**Action:** Klik icon mata (👁️) pada salah satu aset

**Check:**
- [ ] Foto besar muncul dengan benar (full width, h-64)
- [ ] Foto tidak pecah/broken
- [ ] Aspect ratio terjaga (object-cover)
- [ ] Border dan rounded corner tampil

---

### 3. Halaman Edit Aset
**Action:** Klik icon edit (✏️) pada salah satu aset

**Check:**
- [ ] Preview foto lama muncul (128x128px)
- [ ] Foto tidak pecah/broken
- [ ] Input file untuk ganti foto muncul
- [ ] Text helper muncul: "Format: JPG, PNG (Max: 2MB)"

---

### 4. Test Upload Foto Baru
**Action:** Upload foto baru via form edit/create

**Check:**
- [ ] Upload berhasil tanpa error
- [ ] Foto baru muncul setelah save
- [ ] Foto lama terhapus (jika replace)
- [ ] File tersimpan di `storage/app/public/aset-photos/`

---

### 5. Browser Console Check
**Action:** Buka Developer Tools (F12) → Console tab

**Check:**
- [ ] Tidak ada error 404 untuk foto
- [ ] Tidak ada error JavaScript
- [ ] Network tab menunjukkan foto ter-load dengan status 200

**Expected URL format:**
```
http://localhost/storage/aset-photos/[hash].jpg
http://localhost/storage/aset-photos/[hash].png
```

---

## 🐛 Troubleshooting

### Jika foto masih pecah:

1. **Clear browser cache:**
   - Chrome: Ctrl + Shift + Delete
   - Hard refresh: Ctrl + F5

2. **Cek symlink lagi:**
   ```bash
   Get-Item public\storage | Select-Object LinkType, Target
   ```

3. **Cek file exists:**
   ```bash
   dir public\storage\aset-photos
   ```

4. **Recreate symlink:**
   ```bash
   Remove-Item -Path public\storage -Force -Recurse
   php artisan storage:link
   ```

5. **Clear Laravel cache lagi:**
   ```bash
   php artisan cache:clear
   php artisan view:clear
   php artisan config:clear
   ```

---

## ✅ Expected Result

Setelah semua testing passed:
- ✅ Foto muncul di index, show, dan edit page
- ✅ Upload foto baru berfungsi
- ✅ Replace foto berfungsi
- ✅ Placeholder muncul untuk aset tanpa foto
- ✅ No error di browser console

---

**Status:** Ready for manual browser testing 🚀

**Last Updated:** 2026-08-07
