RECCE CLIENT PORTAL — TEST SETUP & MANUAL TEST GUIDE Phase 4.4 + 4.10 (single + bulk response) Date written: 2026-06-14 URL: https://srv1111289.hstgr.cloud/recce-client/ ═══════════════════════════════════════════════════════════════ PREREQUISITES (run once — already done as of 2026-06-14) ═══════════════════════════════════════════════════════════════ The following seed data was applied directly via SQL: -- HP client entity INSERT INTO counters.client (client_id, name, brand_codes, contact_email, contact_name, created_by) VALUES ('cli-hp-test', 'HP India (Test)', ARRAY['HP'], 'haris.lal.1974@gmail.com', 'Harish Lal', 'harish') ON CONFLICT (client_id) DO NOTHING; -- Mark Shivaay Infotech Recce as official for client UPDATE recce.submissions SET is_official_for_client = TRUE, client_id = 'cli-hp-test', client_status = 'pending' WHERE sub_id = 'RC_1779455352573_IMWV'; Verify still in place: ! docker exec -i postgres psql -U lmadmin -d lm360 -c \ "SELECT sub_id, brand, is_official_for_client, client_id, client_status \ FROM recce.submissions WHERE sub_id = 'RC_1779455352573_IMWV';" Expected: is_official_for_client=t, client_id=cli-hp-test, client_status=pending ═══════════════════════════════════════════════════════════════ STEP 1 — SEND THE INVITE (Counters PWA) ═══════════════════════════════════════════════════════════════ 1. Open https://srv1111289.hstgr.cloud/counters/ 2. Log in as harish. 3. Find client "HP India (Test)" in the Clients list. 4. Tap ✉ Invite user. 5. Fill in: Email : haris.lal.1974@gmail.com (or any address) Display name : HP Approver (optional) Role : SM Scope : All client's Recces ← IMPORTANT: must be "All" (territory/job_id scopes won't work — Recce has no counter_id so territory = null) 6. Tap Send invitation. Confirm success toast. ═══════════════════════════════════════════════════════════════ STEP 2 — GET THE MAGIC LINK TOKEN (skip email) ═══════════════════════════════════════════════════════════════ Run this immediately after sending the invite: ! docker exec -i postgres psql -U lmadmin -d lm360 -c \ "SELECT invite_id, email, expires_at \ FROM counters.client_invite \ WHERE client_id = 'cli-hp-test' \ ORDER BY issued_at DESC LIMIT 1;" Copy the invite_id value (starts with something like "inv-..."). If the invite has expired (expires_at < now()), re-send from Step 1. ═══════════════════════════════════════════════════════════════ STEP 3 — OPEN THE PORTAL (magic link) ═══════════════════════════════════════════════════════════════ Construct the URL: https://srv1111289.hstgr.cloud/recce-client/?token= Open in a PRIVATE / INCOGNITO browser tab (clears any existing session). Expected on landing: - Lands directly on list screen (#s-list) — NOT the login screen. - Header shows "🏷 Recce Portal" + user pill with "HP Approver". - Summary shows "1 Recce". - One row: "Shivaay Infotech · HP" with a "Pending" status pill. ═══════════════════════════════════════════════════════════════ STEP 4 — SINGLE RESPONSE TESTS ═══════════════════════════════════════════════════════════════ TEST A: Approve 1. Tap the Recce row → viewer screen (#s-viewer). 2. Confirm "View report (HTML)" button is visible → tap it → report opens in new tab (signed /recce-view-proxy/?t=... URL). 3. In response card: confirm Submit is DISABLED before selecting radio. 4. Select "✓ Approve as-is". 5. Submit button should ENABLE (no comment needed). 6. Tap Submit. 7. Expected: returns to list, status pill changes to "Approved" (green). TEST B: Approve with changes 1. Tap the same Recce row again. 2. Select "✏ Approve with changes". 3. Type 1 char in comment ("x") → Submit must stay DISABLED, hint shows "Min 3 chars". 4. Enter real comment: "Glow sign needs to shift 30cm left." 5. Submit → list → status pill shows "w/ Changes" (blue). TEST C: Reject (optional — overwrites previous) 1. Tap the Recce row again. 2. Select "✗ Reject". 3. Try Submit without a comment → must stay DISABLED. 4. Enter comment: "Wrong store visited, please redo." 5. Submit → list → status pill shows "Rejected" (red). ═══════════════════════════════════════════════════════════════ STEP 5 — BULK RESPONSE TEST (needs 2+ Recces in portal) ═══════════════════════════════════════════════════════════════ Currently only 1 Recce is marked official for this client. To test bulk: mark a second HP Recce official — ! docker exec -i postgres psql -U lmadmin -d lm360 -c \ "UPDATE recce.submissions \ SET is_official_for_client = TRUE, \ client_id = 'cli-hp-test', \ client_status = 'pending' \ WHERE sub_id = 'RC_1779275334421_TQ5H';" Then reload the portal — 2 rows should appear. Bulk flow: 1. Tap "☐ Select" in header → bulk mode, checkboxes appear. 2. Select 2 rows. 3. Bottom bar shows "2 selected" → tap "Respond ↗". 4. Bulk modal opens with count = 2. 5. Select "✓ Approve as-is" → Submit enables. 6. Submit → both rows update to "Approved". 7. Tap "☐ Select" to exit bulk mode. ═══════════════════════════════════════════════════════════════ STEP 6 — VERIFY RESPONSE SAVED IN DB ═══════════════════════════════════════════════════════════════ ! docker exec -i postgres psql -U lmadmin -d lm360 -c \ "SELECT sub_id, client_status, client_comment, client_approved_by, \ client_approved_at \ FROM recce.submissions \ WHERE sub_id = 'RC_1779455352573_IMWV';" Expected: client_status matches what you submitted, comment populated if applicable, client_approved_by = the client_user_id, timestamp set. ═══════════════════════════════════════════════════════════════ NOTE — SUPERVISOR SIDE (Part E) ═══════════════════════════════════════════════════════════════ The Recce admin (/recce/) does NOT yet have a Client Approval overlay or branding lock banner. Those are net-new UI (planned for a future phase). Supervisor-side verification for now: use the DB query in Step 6 above to confirm responses were saved. ═══════════════════════════════════════════════════════════════ RESET TEST DATA ═══════════════════════════════════════════════════════════════ To reset client_status to pending for re-testing: ! docker exec -i postgres psql -U lmadmin -d lm360 -c \ "UPDATE recce.submissions \ SET client_status = 'pending', \ client_comment = NULL, \ client_approved_by = NULL, \ client_approved_at = NULL \ WHERE client_id = 'cli-hp-test';" To invalidate a used invite (force re-invite): ! docker exec -i postgres psql -U lmadmin -d lm360 -c \ "UPDATE counters.client_invite \ SET used_at = now() \ WHERE client_id = 'cli-hp-test' AND used_at IS NULL;"