Skip to content

URS-039 · Returns form supports multiple item questionnaires

Title: Returns form supports multiple item questionnaires Date: 2026-04-23T03:42:20.319Z Duration: 61.0s Overall Status: ✅ PASS

The system shall support submission and processing of returns

Source: User_Requirement_Specifications_ZuriMED_DeviceFlow.xlsx — the run below proves the system meets this requirement.

Status: ✅ PASS

Each step below corresponds to one Playwright test that ran sequentially. Screenshots and video recordings provide visual evidence of the UI behaviour.

1. Step 1: Login and navigate to returns — ✅ PASS

Section titled “1. Step 1: Login and navigate to returns — ✅ PASS”

What this step proves:

A sales rep logs in and navigates to the returns list. This verifies the returns feature is accessible and that the rep’s permissions permit viewing returns.

Audit events generated by this step:

(Evidence matched by declared name — step timing not available or no events fell in window)

TimeTypeActionUserOrgPerformed
2026-04-23 03:42:22Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions
2026-04-23 03:42:29Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions
2026-04-23 03:43:01Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions
2026-04-23 03:43:14Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions

Screenshots:

step 01 logged in

step 01 returns list

Video recording:


2. Step 2: Submit return request with multiple item questionnaires — ✅ PASS

Section titled “2. Step 2: Submit return request with multiple item questionnaires — ✅ PASS”

What this step proves:

The rep completes the multi-step return form with two different products. Each product has its own return question, so the per-item questionnaire step renders one distinct card per returned item. The rep fills a different answer per item and submits the return. This verifies the URS-039 requirement that the form supports submitting multiple individual item questionnaires.

Screenshots:

step 02 new return form

step 02 products selected

step 02 per item cards rendered

step 02 per item questions filled

step 02 review

step 02 submission success

Video recording:


3. Step 3: View output form for each returned item — ✅ PASS

Section titled “3. Step 3: View output form for each returned item — ✅ PASS”

What this step proves:

Immediately after submission, the rep opens the return detail page — the “output form” that URS-039 asks the system to generate per returned item. The detail page shows each item with its product, lot number, and the per-item questionnaire response captured on the previous step. This is the primary URS-039 evidence that one form is generated per returned item.

Screenshots:

step 03 return detail top

step 03 return detail items visible

step 03 return detail bottom

Video recording:


4. Step 4: Verify return appears in returns list — ✅ PASS

Section titled “4. Step 4: Verify return appears in returns list — ✅ PASS”

What this step proves:

The rep returns to the Returns list and confirms the new return appears with Submitted status. This verifies the system persisted the return and that it is discoverable for follow-up actions.

Screenshots:

step 04 returns list with return

Video recording:


The following SQL queries ran against the application database after the Playwright scenarios completed. Each query asserts a specific condition that proves the feature under test persisted its data correctly.

Return created for StellarTech → ZuriMED — ✅ PASS

Section titled “Return created for StellarTech → ZuriMED — ✅ PASS”

Assertion: A URS-039 return with status=submitted should exist (marker: “URS-039 validation run”).

SELECT id, return_number, status, date_of_event, notes, created_at
FROM returns
WHERE sales_organization_id = $1
AND manufacturer_organization_id = $2
AND notes LIKE '%URS-039%'
AND created_at > NOW() - INTERVAL '2 hours'
ORDER BY created_at DESC
idreturn_numberstatusdate_of_eventnotescreated_at
019db86f-111e-7aab-838a-681ae885f1ffRET-1submitted2026-04-22T05:00:00.000ZURS-039 validation run — submitted at 2026-04-23T03:42:41.530Z2026-04-23T03:42:59.841Z

Assertion: Return should have a return number in RET-XXXXX format.

-- return_number from the row above
return_number
RET-1

One return_items row per returned product — ✅ PASS

Section titled “One return_items row per returned product — ✅ PASS”

Assertion: Expected 2 return_items rows (one per returned product).

SELECT ri.id, ri.product_id, op.sku, op.title, ri.lot_number,
ri.return_item_number, ri.created_at
FROM return_items ri
JOIN org_products op ON op.id = ri.product_id
WHERE ri.return_id = $1
ORDER BY op.sku, ri.lot_number
idproduct_idskutitlelot_numberreturn_item_numbercreated_at
019db86f-1120-78bf-baae-b07d9bd8b5e301989ca1-f2f8-7ab7-8269-7179342797ccFL516SNAFiberLocker® Instrument SNURS039-FL-001RET-1-FL516SNA-12026-04-23T03:42:59.841Z
019db86f-1120-78bf-baae-b07c8818435d01989ca2-6a54-7834-8376-06a0251bacd8SP019N1ASpeedPatch® PETURS039-SP-001RET-1-SP019N1A-12026-04-23T03:42:59.841Z

Each returned item has its own distinct lot number — ✅ PASS

Section titled “Each returned item has its own distinct lot number — ✅ PASS”

Assertion: All expected per-item lot numbers should appear exactly once, proving per-item data was stored.

-- Expected lot numbers: URS039-SP-001, URS039-FL-001
lot_numberskutitle
URS039-FL-001FL516SNAFiberLocker® Instrument SN
URS039-SP-001SP019N1ASpeedPatch® PET

Each returned item has its own questionnaire response — ✅ PASS

Section titled “Each returned item has its own questionnaire response — ✅ PASS”

Assertion: Every return_items row should have at least one return_item_question_responses row, proving one questionnaire was generated per returned item.

SELECT riqr.id, riqr.return_item_id, riqr.question_version_id,
riqr.response_text, ri.lot_number, rpqv.question_text, rpqv.question_type
FROM return_item_question_responses riqr
JOIN return_items ri ON ri.id = riqr.return_item_id
JOIN return_product_question_versions rpqv ON rpqv.id = riqr.question_version_id
WHERE ri.return_id = $1
ORDER BY ri.lot_number
idreturn_item_idquestion_version_idresponse_textlot_numberquestion_textquestion_type
019db86f-1122-7061-90b1-3ea20d818475019db86f-1120-78bf-baae-b07d9bd8b5e303922222-2222-4222-8222-222222222222URS-039 FiberLocker: instrument returned unopened, customer downgraded procedure plan and no longer needs the unit.URS039-FL-001Describe the condition and reason for returning this FiberLocker unittext
019db86f-1122-7061-90b1-3ea16405e801019db86f-1120-78bf-baae-b07c8818435d03911111-2222-4222-8222-222222222222URS-039 SpeedPatch: outer seal ruptured on arrival, adhesive layer contaminated and unusable.URS039-SP-001Describe the defect observed for this SpeedPatch unittext

Per-item answers persisted match the spec input — ✅ PASS

Section titled “Per-item answers persisted match the spec input — ✅ PASS”

Assertion: Each item’s saved response should be distinct and match the answer the spec entered for that product.

-- compares response_text per lot against RETURN_ITEMS definitions
lot_numberquestion_textresponse_textquestion_version_id
URS039-FL-001Describe the condition and reason for returning this FiberLocker unitURS-039 FiberLocker: instrument returned unopened, customer downgraded procedure plan and no longer needs the unit.03922222-2222-4222-8222-222222222222
URS039-SP-001Describe the defect observed for this SpeedPatch unitURS-039 SpeedPatch: outer seal ruptured on arrival, adhesive layer contaminated and unusable.03911111-2222-4222-8222-222222222222

Return linked to ZuriMED (manufacturer) and StellarTech (distributor) — ✅ PASS

Section titled “Return linked to ZuriMED (manufacturer) and StellarTech (distributor) — ✅ PASS”

Assertion: Return should be linked to ZuriMED (manufacturer) and StellarTech (distributor).

SELECT r.manufacturer_organization_id, r.sales_organization_id
FROM returns r
WHERE r.id = $1
manufacturer_organization_idsales_organization_id
a1b2c3d4-e5f6-7890-abcd-ef1234567890b2c3d4e5-f6a7-8901-bcde-f12345678901

Per-declaration outcome of every expectedAuditActions and expectedEmailTemplates entry written into the orchestrator. Missing evidence here is a real test failure, not a soft warning.

Each row asserts that a declared expectedAuditActions entry produced a matching row in audit_events. A ❌ flips overall status to FAIL — the declaration is real proof, not just an annotation.

StepExpected Audit ActionFound
Step 1: Login and navigate to returnsuser_log:user:login

Every row written to audit_events while this test was running (scoped to the demo organizations). Provides compliance evidence that user actions are traced end-to-end (URS-003).

Capture window start: 2026-04-23T03:42:18.416Z

SELECT
ae.created_at,
ae.event_type,
ae.action,
ae.user_id,
u.email AS user_email,
ae.organization_id,
o.name AS organization_name,
ae.object_id,
ae.secondary_object_id,
ae.payload,
ae.route,
ae.trace_id
FROM audit_events ae
LEFT JOIN users u ON u.id = ae.user_id
LEFT JOIN organizations o ON o.id = ae.organization_id
WHERE ae.created_at >= $1
AND ae.organization_id = ANY($2::uuid[])
ORDER BY ae.created_at ASC

4 event(s) captured:

TimeTypeActionUserOrgObject IDPerformedReason
2026-04-23 03:42:22Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions
2026-04-23 03:42:29Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions
2026-04-23 03:43:01Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions
2026-04-23 03:43:14Zuser_loguser:loginbob.kauffman@stellartech.comStellarTech Medical Solutions