At a Glance
Persona: Store Keeper (read-only floor consumer; barcode-scan lookups) · Module: product · Scenarios: ~35
Categories: Happy Path · Permission · Validation · Edge Case
E2E coverage: indirect — exercised through501-grn.spec.ts,701-sr.spec.tsin../carmen-inventory-frontend-e2e/
This page captures the test scenarios the Store Keeper persona drives in the product module. They are read-only consumers at the floor / location level — they scan barcodes for fast product identification during receiving / picking / counting, view handling instructions and per-location stock policy, and post comments for barcode mismatches and operational issues. Their authority on the product master is read + comment only; they do not create, edit, or delete any master-data field. Scenarios concentrate on barcode-scan lookup behaviour, handling-note and per-location-policy reference during count execution, RBAC scope (what they can and cannot see), and the comment / feedback paths for barcode mismatches and handling-note corrections. Their transactional work (running GRN at the dock, executing physical / spot counts, raising stock-in / stock-out, dispatching SR) lives in the respective module persona files. Cross-persona handoffs that pivot off the Store Keeper (Scenarios 1, 9 in the parent overview) live in 04-test-scenarios.md, not here.
| # | Scenario | Pre-condition | Steps | Expected |
|---|---|---|---|---|
| SK-HP-01 | Barcode scan resolves to single active product | Store Keeper sk@blueledgers.com logged in on mobile; on GRN receiving screen for an in-progress GRN; product COF-001 exists with barcode = '8851234567890', active. |
1. Tap scan button → camera reads barcode. 2. Lookup endpoint receives 8851234567890 → queries tb_product.barcode = '8851234567890', filtered to active products. 3. Returns the resolved product card with code, name, photo (if attached), base unit, classification path. 4. Confirm "Add to this GRN line". |
Single resolved match per PRD_VAL_005 (barcode unique app-enforced). GRN line populated with product_id. No state change on product master. Maps to parent Scenario 1 (Store Keeper sees new product during receiving). |
| SK-HP-02 | Search by code (mobile manual search) | No barcode label visible; Store Keeper searches manually. | 1. Tap search → enter COF-001 in search field. 2. Picker shows the matching product. 3. Tap to select. |
Same result as SK-HP-01 — product resolved via code lookup. Per PRD_AUTH_007, scope is the active live catalogue. |
| SK-HP-03 | Reference handling notes before opening a perishable shipment | Receiving a shipment of fresh produce; product P-BERRY has info JSON { "storage": "Refrigerate 2-4°C", "shelfLifeDays": 7, "perishable": true }. |
1. Scan barcode → product card. 2. Tap "View details" → handling notes panel renders the info JSON values. | Storage / shelf-life / perishable flag rendered for Store Keeper reference. The shipment is then routed to the cold-chain station accordingly. No master change. |
| SK-HP-04 | Reference per-location stock policy during count | Executing physical count at LOC-A; product COF-001 has tb_product_location row at LOC-A with par_qty = 20, min_qty = 5, max_qty = 50. Counted qty is 18. |
1. Scan barcode → product card. 2. Tap "View details" → policy panel shows par/min/max for the count location. 3. Counter sees counted-qty 18 vs par 20 → slightly below par; well above min — within expected range. | Policy values surfaced per PRD_AUTH_008. Store Keeper proceeds with the count line; no master change. The count document captures the count line in physical-count. |
| SK-HP-05 | Use barcode for SR dispatch pick confirmation | Dispatching against approved SR; product COF-001; bin location pre-mapped via SR. Store Keeper scans the bin barcode to confirm. |
1. SR dispatch screen shows expected product_id = COF-001 and bin location. 2. Store Keeper picks the bag from the bin and scans the bag's barcode. 3. Mobile resolves to COF-001 — matches expected. 4. Confirm pick. |
Bin-pick confirmation succeeds. Product master is read-only; SR dispatch proceeds in store-requisition. |
| SK-HP-06 | Post comment for barcode mismatch | During receiving, scanned barcode 8851234567890 resolves to "Spring Water 500ml" but the physical bottle is "Spring Water 1L". |
1. Tap "Wrong product" on the resolved product card. 2. Comment screen opens pre-filled with scanned barcode and resolved product reference. 3. Store Keeper adds: "Physical bottle is 1L, master says 500ml. Photo attached." Attach photo. 4. Save. | tb_product_comment row inserted on the affected product with user_id = sk@blueledgers.com, type = user, message, attachments. Product Administrator picks up from queue per parent Scenario 9. Store Keeper may continue the GRN via manual search to find the correct (1L) product or hold the line until master is updated. |
| SK-HP-07 | Post comment for handling-note correction | Storage instruction in tb_product.info says "Ambient", but the supplier bag says "Refrigerate 2-4°C". |
1. View product detail → Comments tab. 2. New comment: "Storage instruction wrong — supplier bag specifies 2-4°C refrigeration. Photo of bag attached." 3. Save. | Comment routed to Product Administrator per parent Scenario 9 (mismatch / correction handoff). Critical safety corrections (allergen omission, hazard flag) are escalated out-of-band in addition to the comment. |
| SK-HP-08 | Post feedback on per-location stock policy | Routine count at LOC-B; consistent under-stock at min_qty = 5 for product MILK-002; constant rush re-orders. Store Keeper believes min_qty should be 10. |
1. Open product MILK-002 → Location Assignment tab → click LOC-B row. 2. Comment panel: "Min qty 5 at LOC-B is too low — consistent stock-outs. Suggest 10." 3. Save. |
Comment routed to Inventory Controller (not Product Administrator) per inventory/02-business-rules INV_AUTH_004 (replenishment policy authority). Cross-persona handoff covered in product/03-user-flow Section 4. |
| SK-HP-09 | Inspect product detail offline / cached | Mobile in poor connectivity at the dock; recent product data cached. | 1. Open product detail; mobile renders from cache. 2. Some fields may be stale (last-receiving cost, current on-hand); flagged as "offline / cached". | Read-only offline mode per the mobile-PWA convention. Stale data caveat surfaced; full re-fetch when connectivity returns. |
| # | Scenario | Expected behaviour (allow/deny + reason) |
|---|---|---|
| SK-PERM-01 | Store Keeper performs barcode lookup | Allow. Per PRD_AUTH_007, barcode lookup endpoint is available to Store Keeper. Scope is the active catalogue (product_status_type = active, is_active = true, deleted_at IS NULL). |
| SK-PERM-02 | Store Keeper reads per-location stock policy | Allow read-only. Per PRD_AUTH_008. Cannot edit. |
| SK-PERM-03 | Store Keeper attempts to edit tb_product_location policy |
Deny — Inventory Controller required. Per INV_AUTH_004. The Store Keeper's path is to post feedback per SK-HP-08, routed to Inventory Controller. |
| SK-PERM-04 | Store Keeper attempts to create a new product | Deny — Product Administrator required. Per PRD_AUTH_001. Mobile UI has no "create new product" affordance. Direct API submission returns 403 Forbidden. Path: post a comment requesting Product Administrator create the product. |
| SK-PERM-05 | Store Keeper attempts to edit tb_product fields (including barcode) |
Deny. Write authority is Product Administrator. The Store Keeper's barcode-mismatch path is to comment, not directly edit. |
| SK-PERM-06 | Store Keeper attempts to delete a product or any of its sub-rows (conversions, vendor mapping) | Deny. Delete authority is Product Administrator. 403 Forbidden. |
| SK-PERM-07 | Store Keeper posts comments on product | Allow. Per PRD_XMOD_011. Comment routes to Product Administrator for review (or Inventory Controller for policy-related comments). |
| SK-PERM-08 | Store Keeper views activity log on a product | Allow read-only per PRD_XMOD_011. Sees history of master changes. |
| SK-PERM-09 | Store Keeper views inactive / deleted products | Allow read if filter toggled — but cannot select for new transactions per PRD_XMOD_001. Used for "what was here before" research during count investigations. |
| SK-PERM-10 | Store Keeper exports the catalogue | Restricted — typically not available on mobile. Desktop access subject to tenant policy; Store Keepers typically do not export. |
| # | Scenario | Trigger | Expected error |
|---|---|---|---|
| SK-VAL-01 | Scan resolves to no product (PRD_VAL_005 complement) |
Barcode 9999999999999 not in tb_product.barcode; barcode lookup. |
Empty resolved-set — UI shows "No product found for barcode . Search manually or request new product." Store Keeper uses manual search or posts a new-product-request comment. Not strictly a validation error — empty result. |
| SK-VAL-02 | Scan resolves to inactive product | Active barcode index returns a match; product_status_type = inactive. |
Reject at line save per PRD_XMOD_001: "Product <code> is inactive or deleted and cannot be added to new transactions." Mobile UI surfaces an inactive flag on the resolved product card; the "Add to line" button is disabled. Store Keeper investigates — typically the product needs to be re-activated by Product Administrator before continuing. |
| SK-VAL-03 | Scan resolves to soft-deleted product (rare) | Soft-deleted product still has barcode in DB; lookup returns it. | Reject at line save — "Product <code> is inactive or deleted and cannot be added to new transactions." The barcode-lookup endpoint should normally filter to non-deleted; defensive backend check catches edge case. |
| SK-VAL-04 | Multiple barcode matches (data quality issue) | Two products live with the same barcode (should not happen per PRD_VAL_005 app-enforcement; rare race / bug). |
UI shows ambiguous-result picker — Store Keeper selects the correct active one (or "Wrong product" if neither matches physical). Post comment so Product Administrator de-duplicates. |
| SK-VAL-05 | Pick a unit not configured on stock-in / stock-out | Performing a manual stock-in; product has no order-unit BAG; Store Keeper attempts to enter qty in BAG. |
Reject per PRD_XMOD_006: "No conversion factor defined for unit BAG → <base unit> on product <code>." Same pattern as Purchaser flow. Resolution: post comment requesting Product Administrator add the conversion. |
| SK-VAL-06 | Comment attachment exceeds size limit | Photo attachment is 20MB; tenant limit is 5MB. | Reject at submit — "Attachment exceeds maximum size (5MB)." Store Keeper resizes / re-takes the photo and re-submits. |
| SK-VAL-07 | Submit perishable stock-in without expiry date | Stock-in for a perishable product; expiry-date field empty. | Reject at submit per INV_VAL_006 extended for perishable products. Perishable flag is on tb_product.info. The product-side validation feeds the inventory-side rule; the path is documented in inventory/04-test-scenarios-store-keeper SK-HP-06. |
| # | Scenario | Condition | Expected |
|---|---|---|---|
| SK-EDGE-01 | Barcode label damaged / unreadable | Camera cannot decode the barcode after several attempts. | Fallback to manual code / name search. Standard mobile flow. No special handling on the product side; per good-receive-note receiving flow. |
| SK-EDGE-02 | Scanned barcode matches multiple historical (soft-deleted) products | Active product has no barcode collision; two soft-deleted products have the same barcode. Live filter on lookup excludes them. | Single live match returned. Audit query (Auditor role) sees the historical duplicates. No Store Keeper impact. |
| SK-EDGE-03 | Per-location policy not configured (no tb_product_location row) |
Product has no tb_product_location row at the count location. |
Detail view shows "Policy not configured for this location" rather than zero values. Counter notes the discrepancy and posts a comment to Inventory Controller (or to Product Administrator if the location-mapping row itself is missing, per persona handoff in product/03-user-flow). |
| SK-EDGE-04 | Standard cost is zero | Free / FOC products have standard_cost = 0; Store Keeper at receiving sees the zero. |
Display shows ฿0.00; no anomaly flag (FOC items are legitimate). Per PRD_VAL_007, zero is permitted. |
| SK-EDGE-05 | Product moved to different item-group mid-count | Counter has the product detail open during count execution; Product Administrator concurrently re-classifies. | Per PRD_LIFE_010: change is prospective. Counter's current detail view may show stale classification path until refresh. Count line itself is not affected (snapshot at line save). |
| SK-EDGE-06 | Multiple users on same mobile device session | Shift change; Store Keeper A logs out, Store Keeper B logs in on the same tablet. Pending comment draft from A still in local cache. | Comment draft session-scoped to user; B does not see A's draft. Standard auth pattern; no product-side concern. |
| SK-EDGE-07 | Comment thread on a product accumulates many replies | High-velocity product receives 30+ comments / replies from Store Keepers / Purchasers over months. | All comments retained on tb_product_comment. Threading / pagination on the comment tab. Recent-first sort. Audit log captures all. |
| SK-EDGE-08 | Read soft-deleted product via direct ID (auditor research support) | Auditor role asks Store Keeper to verify a historical product's handling notes. | Per PRD_AUTH_011, Auditor sees soft-deleted rows. If the Store Keeper has read scope (via toggle on the catalogue list), they can view the soft-deleted product's detail. Cannot add to new lines. |
| SK-EDGE-09 | Scan during connectivity outage | Mobile offline; barcode scan attempted. | Per offline mode: scan posts to local queue; lookup runs against cached catalogue; if found, line is staged locally and syncs on reconnect. If not in cache, "Offline — barcode not in local catalogue" message; Store Keeper notes physically and resolves on reconnect. |
PRD_VAL_005 (barcode uniqueness app-enforced); authorization PRD_AUTH_007 (Store Keeper read with barcode lookup), PRD_AUTH_008 (read of per-location policy, not edit); cross-module PRD_XMOD_001 (inactive product rejected on new line). Inventory-side INV_VAL_006 (lot identity + perishable expiry) and INV_AUTH_004 (Inventory Controller owns replenishment policy) are referenced for SK-VAL-07 and SK-HP-08.501-grn.spec.ts), physical-count / spot-check (count execution specs), and store-requisition (701-sr.spec.ts) — which all exercise the barcode-scan and product-picker paths from the Store Keeper's transactional flows. Most scenarios above are manual / planned. Mobile happy-path fixture aligns with sk@blueledgers.com.tb_stock_in / tb_stock_out; reads tb_product_location policy; INV_AUTH_004 reserves policy edit to Inventory Controller.