URS-018 · Upload PO to an Existing Order
Status: PASS · Duration: 59s · Run Date: April 21, 2026
Test Scenarios
Section titled “Test Scenarios”Step 1: Create order without PO
Section titled “Step 1: Create order without PO”



Step 2: No documents linked
Section titled “Step 2: No documents linked”

Step 3: PO document attached
Section titled “Step 3: PO document attached”

Step 4: PO persists after reload
Section titled “Step 4: PO persists after reload”
Recordings
Section titled “Recordings”step 01 create order
Section titled “step 01 create order”step 02 no documents
Section titled “step 02 no documents”step 03 po attached
Section titled “step 03 po attached”step 04 verify persistence
Section titled “step 04 verify persistence”Database Validations
Section titled “Database Validations”Test order created
Section titled “Test order created”An order should have been created during the test
SELECT id, request_number, order_type, status, created_at FROM order_requests WHERE requested_by_user_id = $1 AND notes LIKE $2 ORDER BY created_at DESC LIMIT 1| id | request_number | order_type | status | created_at |
|---|---|---|---|---|
| 019dae24-27b6-7565-9172-0b7b82237ad2 | OR-1 | direct | submitted | 2026-04-21T03:44:58.272Z |
PO document linked to order
Section titled “PO document linked to order”At least one PO document should be linked to the test order
SELECT ord.id, ord.order_request_id, d.filename, d.mime_type, d.category, ord.created_at FROM order_request_documents ord JOIN documents d ON d.id = ord.document_id WHERE ord.order_request_id IN ( SELECT id FROM order_requests WHERE requested_by_user_id = $1 AND notes LIKE $2 ) ORDER BY ord.created_at DESC| id | order_request_id | filename | mime_type | category | created_at |
|---|---|---|---|---|---|
| 019dae24-7d2c-774a-8e13-5853aeded1dd | 019dae24-27b6-7565-9172-0b7b82237ad2 | test-po.pdf | application/pdf | direct_order | 2026-04-21T03:45:20.130Z |
Document has correct category
Section titled “Document has correct category”Uploaded PO document should have category “direct_order”
SELECT d.id, d.filename, d.category, d.mime_type, d.size FROM documents d JOIN order_request_documents ord ON ord.document_id = d.id WHERE ord.order_request_id IN ( SELECT id FROM order_requests WHERE requested_by_user_id = $1 AND notes LIKE $2 ) ORDER BY d.created_at DESC LIMIT 1| id | filename | category | mime_type | size |
|---|---|---|---|---|
| 019dae24-7d29-72c6-a06f-c782dc322125 | test-po.pdf | direct_order | application/pdf | 582 |