Skip to main content

Driver Leg Status + BOL/POD QA Matrix

Scopeโ€‹

This matrix validates the trucking driver flow and recent backend/mobile changes for:

  • Leg status progression: assigned -> en_route -> loaded -> in_transit -> delivered
  • BOL/POD enforcement modes (strict and flexible)
  • Override reason capture and exception reporting
  • Task auto-complete from media uploads
  • BOL/POD history behavior
  • Offline queue + replay for failed status transitions

Environmentsโ€‹

  • Mobile app: attunelogic-mobile
  • API: attunelogic-api
  • App type: trucking
  • Test tenants:
    • Tenant A: tasks.bolPodEnforcement.mode = flexible
    • Tenant B: tasks.bolPodEnforcement.mode = strict

Pre-Test Setupโ€‹

  1. Ensure a driver user exists and is assigned to a job with at least one leg.
  2. Ensure test leg begins in assigned.
  3. Prepare two task templates on leg flow:
    • BOL-related task (pickup) and POD-related task (delivery)
    • Mark required/signature flags according to test case.
  4. Set config variants by tenant:
    • tasks.bolPodEnforcement.mode
    • tasks.bolPodEnforcement.requireOverrideReason
    • tasks.autoCompleteOnMediaUpload.enabled
    • tasks.autoCompleteOnMediaUpload.mappings
  5. For offline tests, disable network on test device after opening the leg.

Matrixโ€‹

IDAreaScenarioStepsExpected Result
Q1Status FlowHappy path with docs presentUpload BOL, move to loaded; upload POD, move to deliveredAll transitions succeed; success alerts shown; leg status updates correctly
Q2Status FlowVerify en_route step existsFrom assigned, tap first CTAStatus becomes en_route; next CTA becomes pickup confirmation
Q3Flexible PolicyMissing BOL at loaded without overrideIn flexible tenant, do not upload BOL; attempt loadedAPI returns conflict requiring override; app prompts for override reason
Q4Flexible PolicyMissing BOL at loaded with overrideSelect override reason and continueTransition succeeds; exception reported; status history includes override metadata
Q5Flexible PolicyMissing POD at delivered with overrideDo not upload POD; proceed with override reasonTransition succeeds; exception entry saved for POD override
Q6Strict PolicyMissing BOL in strict tenantDo not upload BOL; attempt loadedAPI blocks transition (conflict); no status change
Q7Strict PolicyMissing POD in strict tenantDo not upload POD; attempt deliveredAPI blocks transition (conflict); no status change
Q8TasksRequired signature task blocksKeep required BOL/POD signature task incompleteApp blocks transition and prompts signature capture
Q9TasksSignature capture completes taskCapture signature from promptSignature saved; linked task marked complete; transition can proceed
Q10Auto-CompleteMedia upload auto-completes mapped tasksEnable autoCompleteOnMediaUpload; upload BOL/POD filesMatching tasks complete automatically using mapping aliases
Q11Auto-CompleteAlias mapping supportUse custom mapping alias in tenant configTask still auto-completes without default template name
Q12Media ModelMulti-upload BOL historyUpload BOL twicebol points to latest; bolHistory contains both in order
Q13Media ModelMulti-upload POD historyUpload POD multiple timespod points to latest; podHistory contains all entries
Q14Exception APIManual exception reporting endpointCall POST /legs/:id/exception with code/reason200 success; exception appended to leg; timeline/audit entry added
Q15Offline RetryFailed transition queued and replayedDisable network; attempt transition; restore network and reopen legPending update is queued, replayed, then queue entry cleared
Q16Cache/RefreshLeg media refresh after signature uploadUpload signature BOL/POD and return to document viewLeg media reflects new document without stale state

API Verification Checklistโ€‹

  • Status update endpoint:
    • GET /api/v1/legs/:id/status?status=<value>
    • Validate behavior for:
      • missing required media (strict/flexible)
      • override flags (missingDocsOverride, overrideReason, overrideSource)
  • Completion endpoint:
    • GET /api/v1/legs/:id/complete
    • Validate same enforcement behavior for delivery completion
  • Exception endpoint:
    • POST /api/v1/legs/:id/exception
    • Payload example:
      • code: missing_required_document_override
      • reason: selected driver reason
      • status: target status
      • docType: bol or pod

Mobile Verification Checklistโ€‹

  • DriverLoadActions:
    • Correct CTA order and labels by status
    • Override reason prompt shown only when required
    • Correct error handling and retry messaging
  • Task interactions:
    • Required signature tasks block correctly
    • Signature capture unblocks progression
  • Offline behavior:
    • Queued transition survives app state changes
    • Replay happens when connectivity returns

Regression Checklistโ€‹

  • Existing legs with legacy status aliases still normalize and transition correctly.
  • Non-trucking app type behavior remains unchanged.
  • Existing task templates continue to function if mappings are not customized.
  • Shift/break behavior remains unaffected by leg status and BOL/POD changes.

Exit Criteriaโ€‹

  • All matrix cases Q1-Q16 pass in at least one staging run.
  • No blocker/critical defects in status transitions or document enforcement.
  • Strict and flexible tenant modes both validated and documented.
  • Support notes prepared for dispatch/operations on override reason handling.