Document Upload

Step 3 โ€” all upload validations, slot states, and security tests

Document Upload

๐Ÿ“ Document Slots 8 Slots

Bank Stmt 1 Bank Stmt 2 Bank Stmt 3 Bank Stmt 4 Voided Check Business License Driving License Tax Return

6 required ยท 2 optional ยท Max file size: 10 MB ยท Accepted: PDF, JPG, PNG

๐Ÿงช Test Cases 10 Tests

Auto-Assign Drop Zone โ†’ First Empty Slots

Drag 3 valid PDFs onto the drop zone. Files auto-assign to first empty slots in config order.

Per-Slot Click "Add" on Specific Slot

Click "Add" on a specific slot (e.g., Voided Check). File picker opens โ€” file goes to that slot only.

Rejected File Type (.exe)

Drag a .exe file. Rejected with: "File type .exe is not accepted. Allowed: PDF, JPG or PNG"

Rejected File Size (> 10 MB)

Drag a file >10 MB. Rejected with size error message including actual file size.

Overflow More Files Than Slots

Drag 9 files (8 slots). First 8 fill slots. 9th triggers: "1 file(s) were not added." Toast auto-dismisses.

Replace Remove and Re-add

Click Remove on an uploaded slot. Slot reverts to empty. Accept new file.

Validation Required vs Optional

Fill 4 of 6 required. Leave 2 required empty. Click Next โ€” validation fails on empty required. Optional ignored.

Security XSS in File Name

Filename <img src=x onerror=alert(1)>.pdf displayed as plain text via textContent.

Empty 0-byte File

Drag a 0-byte file. Rejected: "File is empty". No content read.

Retry Failed Slot Recovery

Failed slot shows "Retry" link. Clicking it re-opens file picker for that specific slot.
โœ“ 8 slots render (6 required + 2 optional)
โœ“ Drop zone accepts drag-and-drop and click-to-browse
โœ“ Auto-assign fills first empty slots in config order
โœ“ File type/size/empty validation with clear errors
โœ“ XSS filename rendered as text, never executed
โœ“ Remove empties slot, Retry re-opens picker
โœ“ Toast auto-dismisses after 5 seconds