URS-034 · Export Order and Inventory History for Audits
Status: PASS · Duration: 1m 6s · Run Date: April 21, 2026
Test Scenarios
Section titled “Test Scenarios”Step 1: Exports page overview
Section titled “Step 1: Exports page overview”

Step 2: Export order history
Section titled “Step 2: Export order history”

Step 3: Order export verification
Section titled “Step 3: Order export verification”
Step 4: Export inventory
Section titled “Step 4: Export inventory”

Step 5: Date range filtering
Section titled “Step 5: Date range filtering”
Step 6: Permission restriction
Section titled “Step 6: Permission restriction”
Recordings
Section titled “Recordings”step 01 exports page
Section titled “step 01 exports page”step 02 export orders
Section titled “step 02 export orders”step 03 verify orders
Section titled “step 03 verify orders”step 04 export inventory
Section titled “step 04 export inventory”step 05 date range filter
Section titled “step 05 date range filter”step 06 permission restriction
Section titled “step 06 permission restriction”Database Validations
Section titled “Database Validations”Exports feature flag enabled
Section titled “Exports feature flag enabled”The “exports” feature flag should be enabled for StellarTech
SELECT id, value FROM feature_flags WHERE id = 'exports' AND organization_id = $1| id | value |
|---|---|
| exports | true |
Admin role has exports:access
Section titled “Admin role has exports:access”The StellarTech Admin role should have exports:access permission
SELECT p.permission FROM permissions p WHERE p.actor_id = $1 AND p.permission = 'exports:access'| permission |
|---|
| exports:access |
Sales rep role lacks exports:access
Section titled “Sales rep role lacks exports:access”The Sales Rep role should NOT have exports:access permission
SELECT p.permission FROM permissions p WHERE p.actor_id = $1 AND p.permission = 'exports:access'No rows returned.
Order requests exist for organization
Section titled “Order requests exist for organization”At least one order request should exist for StellarTech
SELECT COUNT(*) as count, MIN(created_at) as oldest_order, MAX(created_at) as newest_order FROM order_requests WHERE requesting_organization_id = $1 OR fulfilling_organization_id = $1| count | oldest_order | newest_order |
|---|---|---|
| 3 | 2026-03-22T02:23:21.028Z | 2026-04-16T02:23:21.028Z |
Inventory items exist for organization
Section titled “Inventory items exist for organization”At least one inventory item with positive quantity should exist for StellarTech
SELECT COUNT(*) as count FROM inventory_items WHERE organization_id = $1 AND (quantity_ready > 0 OR quantity_backordered > 0 OR quantity_in_transit > 0)| count |
|---|
| 4 |
Admin user has Admin role
Section titled “Admin user has Admin role”Dan Distributor should have the Admin role for StellarTech
SELECT u.email, u.name, r.name as role_name, r.id as role_id FROM users u JOIN user_roles ur ON ur.user_id = u.id JOIN roles r ON r.id = ur.role_id WHERE u.id = $1 AND ur.organization_id = $2| name | role_name | role_id | |
|---|---|---|---|
| dan.distributor@stellartech.com | Dan Distributor | StellarTech Admin | 40e1f2a3-b4c5-6789-4567-890123456789 |