URS-023 · Generate Shipping Documentation Linked to Orders
Status: PASS · Duration: 1m 58s · Run Date: April 21, 2026
Test Scenarios
Section titled “Test Scenarios”Step 1: Create order
Section titled “Step 1: Create order”



Step 2: Approve and find fulfillment
Section titled “Step 2: Approve and find fulfillment”





Step 3: Create shipment
Section titled “Step 3: Create shipment”


Step 4: Verify package
Section titled “Step 4: Verify package”

Step 5: Verify linkage
Section titled “Step 5: Verify linkage”

Recordings
Section titled “Recordings”step 01 create order
Section titled “step 01 create order”step 02 approve and find
Section titled “step 02 approve and find”step 03 create shipment
Section titled “step 03 create shipment”step 04 verify package
Section titled “step 04 verify package”step 05 verify linkage
Section titled “step 05 verify linkage”Database Validations
Section titled “Database Validations”Order request created
Section titled “Order request created”At least one order request should have been created by Bob Kauffman recently
SELECT orq.id, orq.request_number, orq.status, orq.shipping_status, orq.created_at, orq.requested_by_user_id FROM order_requests orq WHERE orq.requested_by_user_id = $1 AND orq.created_at > NOW() - INTERVAL '30 minutes' ORDER BY orq.created_at DESC LIMIT 5| id | request_number | status | shipping_status | created_at | requested_by_user_id |
|---|---|---|---|---|---|
| 019dadd8-919e-76b8-b235-630676c9c93e | OR-1 | approved | 2026-04-21T02:22:24.655Z | 17b8c9d0-e1f2-3456-1234-567890123456 |
Fulfillment order created and linked to order request
Section titled “Fulfillment order created and linked to order request”A fulfillment order should exist linked to the order request
SELECT fo.id, fo.order_number, fo.status, fo.order_request_id, fo.fulfilling_organization_id, fo.requesting_organization_id, fo.shipping_street_address, fo.shipping_city, fo.shipping_state, fo.shipping_zip, fo.created_at FROM fulfillment_orders fo JOIN order_requests orq ON fo.order_request_id = orq.id WHERE orq.requested_by_user_id = $1 AND orq.created_at > NOW() - INTERVAL '30 minutes' ORDER BY fo.created_at DESC LIMIT 5| id | order_number | status | order_request_id | fulfilling_organization_id | requesting_organization_id | shipping_street_address | shipping_city | shipping_state | shipping_zip | created_at |
|---|---|---|---|---|---|---|---|---|---|---|
| 019dadd8-e6bd-7aa9-bf74-3c54c8caf6a4 | OR-1-FO-1 | created | 019dadd8-919e-76b8-b235-630676c9c93e | a1b2c3d4-e5f6-7890-abcd-ef1234567890 | b2c3d4e5-f6a7-8901-bcde-f12345678901 | 100 Charles River Plaza, Suite 300 | Boston | MA | 02114 | 2026-04-21T02:22:46.426Z |
Fulfillment order items match ordered products
Section titled “Fulfillment order items match ordered products”Fulfillment order should contain both SpeedPatch and FiberLocker products
SELECT foi.id, foi.fulfillment_order_id, foi.product_id, foi.description, foi.quantity, op.title as product_name, op.sku FROM fulfillment_order_items foi JOIN org_products op ON foi.product_id = op.id JOIN fulfillment_orders fo ON foi.fulfillment_order_id = fo.id JOIN order_requests orq ON fo.order_request_id = orq.id WHERE orq.requested_by_user_id = $1 AND orq.created_at > NOW() - INTERVAL '30 minutes' ORDER BY op.title| id | fulfillment_order_id | product_id | description | quantity | product_name | sku |
|---|---|---|---|---|---|---|
| 019dadd8-e6be-7eff-b505-83e20b54f73e | 019dadd8-e6bd-7aa9-bf74-3c54c8caf6a4 | 01978a05-ba4c-7f6d-91c8-bac1498e9bbe | FiberLocker® Instrument (For Cadaver lab use) | 2 | FiberLocker® Instrument (For Cadaver lab use) | FL2025CL |
| 019dadd8-e6be-7eff-b505-83e391c009f2 | 019dadd8-e6bd-7aa9-bf74-3c54c8caf6a4 | 01989ca2-6a54-7834-8376-06a0251bacd8 | SpeedPatch® PET | 3 | SpeedPatch® PET | SP019N1A |
Shipping package created with correct tracking
Section titled “Shipping package created with correct tracking”Shipping package should exist with tracking number URS023-TEST-VALIDATION and carrier UPS
SELECT sp.id, sp.tracking_number, sp.carrier, sp.status, sp.organization_id, sp.created_at FROM shipping_packages sp WHERE sp.tracking_number = $1 AND sp.organization_id IN ($2, $3) LIMIT 1| id | tracking_number | carrier | status | organization_id | created_at |
|---|---|---|---|---|---|
| 019dadd9-796c-761c-a7d6-097954ce1709 | URS023-TEST-VALIDATION | ups | in_transit | b2c3d4e5-f6a7-8901-bcde-f12345678901 | 2026-04-21T02:23:23.984Z |
Shipping package linked to fulfillment order
Section titled “Shipping package linked to fulfillment order”The shipping_package_fulfillment_orders join table should link the package to the fulfillment order
SELECT spfo.id, spfo.shipping_package_id, spfo.fulfillment_order_id, sp.tracking_number, fo.order_number FROM shipping_package_fulfillment_orders spfo JOIN shipping_packages sp ON spfo.shipping_package_id = sp.id JOIN fulfillment_orders fo ON spfo.fulfillment_order_id = fo.id WHERE sp.tracking_number = $1 AND sp.organization_id IN ($2, $3)| id | shipping_package_id | fulfillment_order_id | tracking_number | order_number |
|---|---|---|---|---|
| 019dadd9-796f-745d-ac1a-d9af8983df15 | 019dadd9-796c-761c-a7d6-097954ce1709 | 019dadd8-e6bd-7aa9-bf74-3c54c8caf6a4 | URS023-TEST-VALIDATION | OR-1-FO-1 |
Shipping package items contain correct products
Section titled “Shipping package items contain correct products”Shipping package items should reference the ordered products with correct quantities
SELECT spi.id, spi.package_id, spi.quantity, spi.order_number, spi.order_line_number, spi.info->>'sku' as sku, spi.info->>'productId' as product_id FROM shipping_package_items spi JOIN shipping_packages sp ON spi.package_id = sp.id WHERE sp.tracking_number = $1 AND sp.organization_id IN ($2, $3) ORDER BY spi.order_line_number| id | package_id | quantity | order_number | order_line_number | sku | product_id |
|---|---|---|---|---|---|---|
| 019dadd9-796e-70c4-80c2-b459ba3e7ef9 | 019dadd9-796c-761c-a7d6-097954ce1709 | 2 | FL2025CL | 01978a05-ba4c-7f6d-91c8-bac1498e9bbe | ||
| 019dadd9-796e-70c4-80c2-b45a9c2707bd | 019dadd9-796c-761c-a7d6-097954ce1709 | 3 | SP019N1A | 01989ca2-6a54-7834-8376-06a0251bacd8 |
Fulfillment order exists with valid status
Section titled “Fulfillment order exists with valid status”Fulfillment order should exist (status updates to shipped/delivered when tracking events arrive)
SELECT fo.id, fo.order_number, fo.status FROM fulfillment_orders fo JOIN order_requests orq ON fo.order_request_id = orq.id WHERE orq.requested_by_user_id = $1 AND orq.created_at > NOW() - INTERVAL '30 minutes' ORDER BY fo.created_at DESC LIMIT 1| id | order_number | status |
|---|---|---|
| 019dadd8-e6bd-7aa9-bf74-3c54c8caf6a4 | OR-1-FO-1 | created |