Skip to content

URS-007 · Account Creation with Required Fields

Title: Account Creation with Required Fields Date: 2026-04-23T03:34:57.171Z Duration: 102.9s Overall Status: ✅ PASS

The system shall allow creation of new accounts with required fields (facility name, contacts, addresses).

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 as distributor admin — ✅ PASS

Section titled “1. Step 1: Login as distributor admin — ✅ PASS”

What this step proves:

Establishes that a distributor admin can authenticate and reach the authenticated application. This user holds the sales_accounts:create permission required to access the account creation form. Verifying successful login confirms the entry-point prerequisite for the creation flow.

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:35:03Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:35:11Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:35:19Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:35:28Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:35:40Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:35:58Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:36:26Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:36:35Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions

Screenshots:

step 01 logged in

Video recording:


2. Step 2: Navigate to account creation form — ✅ PASS

Section titled “2. Step 2: Navigate to account creation form — ✅ PASS”

What this step proves:

Confirms the “New Account” entry point on the Sales Accounts list is functional and navigates to the multi-step creation wizard. The list page and the creation form header are both captured as evidence that the routing from list to wizard is working correctly.

Screenshots:

step 02 sales accounts list

step 02 new account form

Video recording:


3. Step 3: Validation error when facility name is missing — ✅ PASS

Section titled “3. Step 3: Validation error when facility name is missing — ✅ PASS”

What this step proves:

Proves the system enforces the facility name and sales representative as required fields on Step 2 of the account creation wizard. Clicking Next without filling either field triggers two distinct validation errors, and the form does not advance to the next step.

Screenshots:

step 03 validation errors step2

Video recording:


4. Step 4: Validation error when shipping address is missing — ✅ PASS

Section titled “4. Step 4: Validation error when shipping address is missing — ✅ PASS”

What this step proves:

Proves the system enforces shipping address as a required field on Step 3. After filling the facility name and assigning a sales rep, advancing without providing street, city, state, and zip triggers a “Shipping address is required” validation error.

Screenshots:

step 04 address validation errors

Video recording:


5. Step 5: Validation error when primary contact is missing — ✅ PASS

Section titled “5. Step 5: Validation error when primary contact is missing — ✅ PASS”

What this step proves:

Proves the system enforces the billing contact fields (name, email, phone) as required on Step 4. After providing a valid shipping address, attempting to advance with an empty billing contact section triggers three separate validation errors — one for each required field.

Screenshots:

step 05 contact validation errors

Video recording:


6. Step 6: Fill all required fields and submit — ✅ PASS

Section titled “6. Step 6: Fill all required fields and submit — ✅ PASS”

What this step proves:

Demonstrates the complete happy-path account creation flow. All required fields are provided across the six-step wizard (facility name, sales rep, shipping address, shipping contact, billing contact, and pricing). Submission completes with a success confirmation, proving that the system accepts and persists a fully completed account.

Audit events generated by this step:

(Evidence scoped to step execution window: 2026-04-23T03:36:01.890Z → 2026-04-23T03:36:21.171Z)

TimeTypeActionUserOrgPerformed
2026-04-23 03:36:18Zuser_logsales_account:createddan.distributor@stellartech.comStellarTech Medical Solutions

Screenshots:

step 06 account details filled

step 06 shipping address filled

step 06 billing contact filled

step 06 pricing defaults

step 06 review

step 06 success screen

Video recording:


7. Step 7: Verify account appears in the accounts list — ✅ PASS

Section titled “7. Step 7: Verify account appears in the accounts list — ✅ PASS”

What this step proves:

Confirms the newly created account is persisted and visible in the Sales Accounts list. Searching for the facility name and finding the matching row demonstrates that the form submission created a real database record that is queryable and displayed in the UI.

Screenshots:

step 07 account in list

Video recording:


8. Step 8: Verify account detail page shows all fields — ✅ PASS

Section titled “8. Step 8: Verify account detail page shows all fields — ✅ PASS”

What this step proves:

Confirms the facility name and shipping address entered during creation are correctly stored and rendered on the account detail page. Opening the account and verifying the heading and address text proves end-to-end persistence of the required fields through the creation wizard.

Screenshots:

step 08 account detail

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.

Account created with required facility name — ✅ PASS

Section titled “Account created with required facility name — ✅ PASS”

Assertion: sales_accounts row with name “ZuriMED Test Facility (URS-007)” should exist and be linked to ZuriMED (manufacturer) and StellarTech (distributor)

SELECT id, name, status,
manufacturer_organization_id, distributor_organization_id,
shipping_location_id, billing_contact_id, shipping_contact_id,
created_at
FROM sales_accounts
WHERE name = $1
AND manufacturer_organization_id = $2
AND distributor_organization_id = $3
idnamestatusmanufacturer_organization_iddistributor_organization_idshipping_location_idbilling_contact_idshipping_contact_idcreated_at
019db868-ef74-7dfc-9c5c-de3600ad19d9ZuriMED Test Facility (URS-007)proposeda1b2c3d4-e5f6-7890-abcd-ef1234567890b2c3d4e5-f6a7-8901-bcde-f12345678901019db868-ef69-7489-a113-6a0808196594019db868-ef70-7bee-9fdb-90924699ad34019db868-ef6c-71ce-9696-515948bf89b32026-04-23T03:36:17.994Z

Shipping address persisted with required fields — ✅ PASS

Section titled “Shipping address persisted with required fields — ✅ PASS”

Assertion: real_world_locations row referenced by shipping_location_id should contain street “123 Medical Drive”, city “Springfield”, state “IL”, zip “62701”

SELECT id, name, street_address, city, state, zip, country, active
FROM real_world_locations
WHERE id = $1
idnamestreet_addresscitystatezipcountryactive
019db868-ef69-7489-a113-6a0808196594ZuriMED Test Facility (URS-007)123 Medical DriveSpringfieldIL62701UStrue

Primary contact persisted with required name — ✅ PASS

Section titled “Primary contact persisted with required name — ✅ PASS”

Assertion: contacts row referenced by billing_contact_id should have name “John Smith”

SELECT id, name, organization_id, active
FROM contacts
WHERE id = $1
idnameorganization_idactive
019db868-ef70-7bee-9fdb-90924699ad34John Smitha1b2c3d4-e5f6-7890-abcd-ef1234567890true

Assertion: contact_items row with type=‘email’ should exist for the billing contact, value=john.smith@zurimed-test-facility.example.com

SELECT id, contact_id, type, value
FROM contact_items
WHERE contact_id = $1
AND type = 'email'
idcontact_idtypevalue
019db868-ef70-7bee-9fdb-90930d16478b019db868-ef70-7bee-9fdb-90924699ad34emailjohn.smith@zurimed-test-facility.example.com

Assertion: contact_items row with type=‘phone’ should exist for the billing contact (standardized to +15551234567)

SELECT id, contact_id, type, value
FROM contact_items
WHERE contact_id = $1
AND type = 'phone'
idcontact_idtypevalue
019db868-ef70-7bee-9fdb-909457be2e32019db868-ef70-7bee-9fdb-90924699ad34phone+15551234567

Shipping contact persisted with required name — ✅ PASS

Section titled “Shipping contact persisted with required name — ✅ PASS”

Assertion: contacts row referenced by shipping_contact_id should have name “John Smith”

SELECT id, name, organization_id, active
FROM contacts
WHERE id = $1
idnameorganization_idactive
019db868-ef6c-71ce-9696-515948bf89b3John Smitha1b2c3d4-e5f6-7890-abcd-ef1234567890true

Assertion: contact_items row with type=‘email’ should exist for the shipping contact, value=john.smith@zurimed-test-facility.example.com

SELECT id, contact_id, type, value
FROM contact_items
WHERE contact_id = $1
AND type = 'email'
idcontact_idtypevalue
019db868-ef6e-768f-ba1e-cc49ffc333f8019db868-ef6c-71ce-9696-515948bf89b3emailjohn.smith@zurimed-test-facility.example.com

Sales rep assigned to the new account — ✅ PASS

Section titled “Sales rep assigned to the new account — ✅ PASS”

Assertion: sales_account_user_assignments should have an active row linking Bob Kauffman to the new account

SELECT sales_account_id, user_id, active, representative_type
FROM sales_account_user_assignments
WHERE sales_account_id = $1
AND user_id = $2
AND active = true
sales_account_iduser_idactiverepresentative_type
019db868-ef74-7dfc-9c5c-de3600ad19d917b8c9d0-e1f2-3456-1234-567890123456truesalesperson

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 as distributor adminuser_log:user:login
Step 6: Fill all required fields and submituser_log:sales_account:created

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:34:55.271Z

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

9 event(s) captured:

TimeTypeActionUserOrgObject IDPerformedReason
2026-04-23 03:35:03Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:35:11Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:35:19Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:35:28Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:35:40Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:35:58Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:36:18Zuser_logsales_account:createddan.distributor@stellartech.comStellarTech Medical Solutions019db868-ef74-7dfc-9c5c-de3600ad19d9
2026-04-23 03:36:26Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions
2026-04-23 03:36:35Zuser_loguser:logindan.distributor@stellartech.comStellarTech Medical Solutions