Verification Matrix — Worker Lock-off and Plant Validation
Implements:
REQ-WORK-006Manually Lock Worker OffREQ-WORK-007Forcefully Lock Worker OffREQ-WORK-008Lock Off Returning to SiteREQ-WORK-009Plant Personnel ValidationREQ-WORK-010QR Lock-off
Requirement → Scenario Index
| Requirement Ref | Requirement (short) | Scenario IDs |
|---|---|---|
| REQ-WORK-010: QR Lock-off | ||
| EDR-1 | QR scan initiates lock-off | TC-WORK-QR-001 |
| EDR-2 | Valid QR locks off worker | TC-WORK-QR-002 |
| EDR-3 | Shift status confirmation required | TC-WORK-SHIFT-003, TC-WORK-SHIFT-004 |
| EDR-4 | Consecutive scanning supported | TC-WORK-QR-009 |
| UNW-1 | Invalid QR rejected | TC-WORK-QR-007 |
| UNW-2 | Worker at wrong site blocked | TC-WORK-QR-006 |
| UNW-3 | QR scan failure offers manual fallback | TC-WORK-QR-010 |
| REQ-WORK-006: Manual Lock-off | ||
| EDR-1 | Manual lock-off available | TC-WORK-LOCKOFF-001, TC-WORK-LOCKOFF-002 |
| EDR-2 | Safety check and shift status required | TC-WORK-LOCKOFF-005 |
| EDR-3 | Success confirmation displayed | TC-WORK-LOCKOFF-001 |
| EDR-4 | Personnel count updated | TC-WORK-LOCKOFF-001 |
| UBI-1 | Offline operation supported | TC-WORK-LOCKOFF-006 |
| UNW-1 | Incomplete verification blocks lock-off | TC-WORK-LOCKOFF-005 |
| REQ-WORK-007: Forced Lock-off | ||
| EDR-1 | Warning displayed on initiation | TC-WORK-FORCED-001 |
| EDR-2 | Verification checks required | TC-WORK-FORCED-002 |
| EDR-3 | NCM authorisation confirmed | TC-WORK-FORCED-003 |
| EDR-4 | Detailed audit event recorded | TC-WORK-FORCED-001 |
| EDR-5 | Confirmation message distinct | TC-WORK-FORCED-001 |
| UBI-1 | Offline operation with audit trail | TC-WORK-FORCED-006 |
| UNW-1 | Incomplete verification blocks | TC-WORK-FORCED-002, TC-WORK-FORCED-003 |
| UNW-2 | Not applicable to returning status | TC-WORK-FORCED-008 |
| REQ-WORK-008: Shift Status | ||
| EDR-1 | Shift status selection required | TC-WORK-SHIFT-008 |
| EDR-2 | Ending shift stops tracking | TC-WORK-SHIFT-002 |
| EDR-3 | Returning continues tracking | TC-WORK-SHIFT-003 |
| EDR-4 | Re-lock-on continues shift | TC-WORK-SHIFT-006 |
| SDR-1 | Returning workers in separate tab | TC-WORK-SHIFT-003, TC-WORK-SHIFT-005 |
| SDR-2 | Active count excludes returning | TC-WORK-SHIFT-003 |
| UBI-1 | Shift tracking works offline | TC-WORK-LOCKOFF-006 |
| REQ-WORK-009: Plant Personnel Validation | ||
| BR-1 | Plant Operator blocks lock-off | TC-WORK-QR-003, TC-WORK-LOCKOFF-003, TC-WORK-FORCED-004, TC-WORK-PLANT-002 |
| BR-2 | MPC triggers warning, allows proceed | TC-WORK-QR-004, TC-WORK-LOCKOFF-004, TC-WORK-FORCED-005, TC-WORK-PLANT-004 |
| BR-3 | Guidance displayed on blocking | TC-WORK-LOCKOFF-003, TC-WORK-PLANT-002 |
| BR-4 | MPC assignments cleared on lock-off | TC-WORK-LOCKOFF-009, TC-WORK-PLANT-004 |
| BR-5 | Plant Operator cleared when plant locked off | TC-WORK-PLANT-011 |
| BR-6 | Multiple plant checked | TC-WORK-PLANT-002, TC-WORK-PLANT-004 |
| BR-7 | Validation applies to all lock-off methods | TC-WORK-QR-003, TC-WORK-LOCKOFF-003, TC-WORK-FORCED-004 |
| BR-8 | Offline validation works | TC-WORK-PLANT-013 |
| UBI-1 | Consistent validation across all methods | Demonstrated across sections 2.1, 2.2, 2.3 |
| UBI-2 | Offline plant validation | TC-WORK-PLANT-013 |
| UBI-3 | All plant assignments checked | TC-WORK-PLANT-002, TC-WORK-PLANT-004, TC-WORK-PLANT-015 |
| COND-1 | Multiple MPC assignments all cleared | TC-WORK-PLANT-004 |
| COND-2 | Forced lock-off requires reassignment | TC-WORK-PLANT-015 |
| UNW-1 | Operator assignment blocks lock-off | TC-WORK-QR-003, TC-WORK-LOCKOFF-003, TC-WORK-FORCED-004 |
| Cross-cutting | ||
| UNW-1 | Not locked on blocks lock-off | TC-WORK-LOCKOFF-010 |
| UNW-2 | Wrong authority blocks access | TC-WORK-LOCKOFF-007, TC-WORK-FORCED-007 |
Scenarios (at a glance)
| ID | Title | Type |
|---|---|---|
| 2.1 QR Lock-off (REQ-WORK-010) | ||
| TC-WORK-QR-001 (3.4.3.1) | QR lock-off succeeds online | Positive |
| TC-WORK-QR-002 | QR lock-off succeeds offline | Edge |
| TC-WORK-QR-003 (3.4.4.4) | Plant Operator blocking via QR | Negative |
| TC-WORK-QR-004 | MPC warning via QR allows proceed | Positive |
| TC-WORK-QR-005 (3.4.4.2) | Not locked on blocks QR lock-off | Defensive |
| TC-WORK-QR-006 (3.4.4.3) | Wrong site alert shown | Defensive |
| TC-WORK-QR-007 (3.4.4.1) | Invalid QR validation fails | Negative |
| TC-WORK-QR-009 | Consecutive QR scanning works | Positive |
| TC-WORK-QR-010 | QR scan failure offers manual fallback | Edge |
| TC-WORK-QR-012 (3.4.3.3) | QR lock-off returning later | Positive |
| 2.2 Manual Lock-off (REQ-WORK-006) | ||
| TC-WORK-LOCKOFF-001 (3.5.2.1) | Manual lock-off ending shift succeeds | Positive |
| TC-WORK-LOCKOFF-002 | Manual lock-off returning later succeeds | Positive |
| TC-WORK-LOCKOFF-003 (3.5.2.3) | Plant Operator blocks manual lock-off | Negative |
| TC-WORK-LOCKOFF-004 (3.5.2.4) | MPC warning allows manual lock-off | Positive |
| TC-WORK-LOCKOFF-005 | No shift status blocks lock-off | Defensive |
| TC-WORK-LOCKOFF-006 | Offline manual lock-off succeeds | Edge |
| TC-WORK-LOCKOFF-007 | SP (Other) cannot lock off | Negative |
| TC-WORK-LOCKOFF-008 | Operator + MPC (Different) blocks | Negative |
| TC-WORK-LOCKOFF-009 | MPC (Multiple) warning clears all | Positive |
| TC-WORK-LOCKOFF-010 | Not locked on blocks manual lock-off | Defensive |
| TC-WORK-LOCKOFF-011 | Returning worker final lock-off | Positive |
| 2.3 Forced Lock-off (REQ-WORK-007) | ||
| TC-WORK-FORCED-001 (3.6.1.1) | Forced lock-off succeeds with all checks | Positive |
| TC-WORK-FORCED-002 (3.6.1.1) | Incomplete verification blocks forced | Defensive |
| TC-WORK-FORCED-004 (3.6.2.2) | Plant Operator blocks forced lock-off | Negative |
| TC-WORK-FORCED-005 (3.6.2.3) | MPC warning allows forced lock-off | Positive |
| TC-WORK-FORCED-006 | Offline forced lock-off succeeds | Edge |
| TC-WORK-FORCED-007 | SP (Other) cannot force lock-off | Negative |
| TC-WORK-FORCED-008 (3.6.1.3) | Not applicable to returning status | Defensive |
| 2.4 Shift Status Management (REQ-WORK-008) | ||
| TC-WORK-SHIFT-001 | Lock-on starts tracking and active count | Positive |
| TC-WORK-SHIFT-002 | Ending shift stops tracking | Positive |
| TC-WORK-SHIFT-003 | Returning continues tracking, removes from active | Positive |
| TC-WORK-SHIFT-006 | Re-lock-on continues same shift | Positive |
| TC-WORK-SHIFT-007 | Multiple lock-off/on maintains shift | Integration |
| 2.5 Plant Assignment Validation (REQ-WORK-009) | ||
| TC-WORK-PLANT-002 | Multiple Plant Operator blocks all | Negative |
| TC-WORK-PLANT-004 | Multiple MPC shows warning, clears all | Positive |
| TC-WORK-PLANT-011 | Plant locked off, then worker locks off | Positive |
| TC-WORK-PLANT-012 | Plant handed over, then worker locks off | Positive |
| TC-WORK-PLANT-013 | Offline validation | Edge |
| TC-WORK-PLANT-015 | Multiple plant must all be resolved | Integration |
Scenario details
2.1 QR Lock-off (REQ-WORK-010)
TC-WORK-QR-001: QR lock-off succeeds online
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active) with no plant assignments
- Worker has valid QR code
- Device is online
- Act
- SP scans worker's QR code
- SP selects shift status: "Ending Shift"
- SP confirms lock-off
- Assert
- Lock-off succeeds
- Worker state changes to Locked Off (Shift Ended)
- Shift tracking ends
- Active count decremented
- Success confirmation displayed
- Worker removed from active list
TC-WORK-QR-002: QR lock-off succeeds offline
- Arrange
- Device is offline
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active) with no plant assignments
- Worker has valid QR code
- Act
- SP scans worker's QR code offline
- SP selects shift status: "Ending Shift"
- SP confirms lock-off
- Assert
- Lock-off succeeds locally
- Worker state changes to Locked Off (Shift Ended)
- Active count decremented locally
- Event queued for sync when online
TC-WORK-QR-003: Plant Operator blocking via QR
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active) assigned as Plant Operator
- Worker has valid QR code
- Device is online
- Act
- SP scans worker's QR code for lock-off
- Assert
- System blocks lock-off
- Plant validation error displayed
- Guidance shown: "Lock off plant or reassign to another operator"
- Lock-off cannot proceed
TC-WORK-QR-004: MPC warning via QR allows proceed
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active) assigned as MPC (single plant)
- Worker has valid QR code
- Device is online
- Act
- SP scans worker's QR code for lock-off
- SP acknowledges MPC warning
- SP selects shift status and confirms
- Assert
- Warning displayed about MPC assignment
- Lock-off allowed to proceed
- MPC assignment cleared on lock-off
- Worker locked off successfully
TC-WORK-QR-005: Not locked on blocks QR lock-off
- Arrange
- User is logged in as Site Protector (Own)
- Worker state: Not on Site (not currently locked on)
- Worker has valid QR code
- Act
- SP scans worker's QR code
- Assert
- System displays error: "Worker not locked on"
- Lock-off does not proceed
TC-WORK-QR-006: Wrong site alert shown
- Arrange
- User is logged in as Site Protector for Worksite A
- Worker is Locked On (Active) to Worksite B (different site, same PWA)
- Worker has valid QR code
- Act
- SP at Worksite A scans worker's QR code
- Assert
- System displays alert: "Worker locked on different site"
- Lock-off blocked
- Clear guidance provided
TC-WORK-QR-007: Invalid QR validation fails
- Arrange
- User is logged in as Site Protector (Own)
- QR code is invalid/expired/corrupted
- Act
- SP attempts to scan invalid QR code
- Assert
- QR validation fails
- Error message displayed
- Lock-off does not proceed
TC-WORK-QR-009: Consecutive QR scanning works
- Arrange
- User is logged in as Site Protector (Own)
- 5 workers Locked On (Active), all with valid QR codes
- No plant assignments
- Device online
- Act
- SP scans Worker 1 QR, selects "Ending Shift", confirms
- SP immediately scans Worker 2 QR, repeats process
- SP continues for all 5 workers rapidly
- Assert
- All 5 workers locked off successfully
- Rapid scanning workflow maintained
- Active count decremented correctly to 0
- No performance issues
TC-WORK-QR-010: QR scan failure offers manual fallback
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active)
- QR code damaged/unreadable or scanner malfunction
- Act
- SP attempts QR scan multiple times, fails
- Assert
- System offers fallback: "Switch to manual lock-off?"
- SP can proceed with manual lock-off instead
- Worker can still be locked off despite QR failure
TC-WORK-QR-012: QR lock-off returning later
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active)
- Worker presents QR code
- Act
- SP scans QR code
- SP selects "Returning to Site Later"
- SP confirms
- Assert
- QR lock-off succeeds
- Shift tracking continues
- Active count decremented
- Worker moved to "Returning" tab
- Visible in separate section
2.2 Manual Lock-off (REQ-WORK-006)
TC-WORK-LOCKOFF-001: Manual lock-off ending shift succeeds
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active) with no plant assignments
- Device is online
- Act
- SP selects worker from active list
- SP initiates manual lock-off
- SP confirms safety check complete
- SP selects ending shift status: "Ending Shift"
- SP confirms lock-off
- Assert
- Lock-off succeeds
- Success confirmation displayed
- Worker state changes to Locked Off (Shift Ended)
- Shift tracking ends
- Active count decremented
- Worker removed from all lists
- Audit trail records manual lock-off method
TC-WORK-LOCKOFF-002: Manual lock-off returning later succeeds
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active) with no plant assignments
- Device is online
- Act
- SP selects worker from active list
- SP initiates manual lock-off
- SP confirms safety check complete
- SP selects ending shift status: "Returning to Site Later"
- SP confirms lock-off
- Assert
- Lock-off succeeds
- Worker state changes to Locked On (Returning)
- Shift tracking continues
- Active count decremented (removed from active count)
- Worker moved to "Returning" tab/section
- Not removed from shift tracking
TC-WORK-LOCKOFF-003: Plant Operator blocks manual lock-off
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active) assigned as Plant Operator (single plant)
- Device is online
- Act
- SP attempts manual lock-off
- Assert
- System blocks lock-off
- Plant validation error displayed with guidance
- Guidance: "Lock off plant or reassign to another operator"
- Cannot proceed until plant resolved
TC-WORK-LOCKOFF-004: MPC warning allows manual lock-off
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active) assigned as MPC (single plant)
- Device is online
- Act
- SP attempts manual lock-off
- SP acknowledges MPC warning
- SP completes lock-off with "Ending Shift"
- Assert
- Warning displayed about MPC assignment
- Lock-off allowed to proceed after acknowledgment
- MPC assignment cleared on lock-off
- Worker locked off successfully
TC-WORK-LOCKOFF-005: No ending-shift status blocks lock-off
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active) with no plant assignments
- Device is online
- Act
- SP initiates manual lock-off
- SP confirms safety check
- SP does NOT select ending shift status
- Assert
- Lock-off button remains disabled/blocked
- Cannot proceed without end shift status selection
- Clear indication that end shift status is required
TC-WORK-LOCKOFF-006: Offline manual lock-off succeeds
- Arrange
- Device is offline
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active) with no plant assignments
- Act
- SP performs manual lock-off offline
- SP confirms safety check, selects "Ending Shift"
- SP completes lock-off
- Assert
- Lock-off succeeds locally
- Worker state changes to Locked Off (Shift Ended)
- Active count decremented locally
- Event queued for sync when online
TC-WORK-LOCKOFF-007: SP (Other) cannot lock off
- Arrange
- User is logged in as Site Protector assigned to Worksite B
- Worker is Locked On (Active) to Worksite A
- Act
- SP (Other) attempts manual lock-off of worker on Worksite A
- Assert
- Access denied
- Lock-off action not available or blocked
- Clear authority boundary enforced
TC-WORK-LOCKOFF-008: Operator + MPC (Different) blocks
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active)
- Worker is Plant Operator for Plant A
- Worker is MPC for Plant B (different plant)
- Device is online
- Act
- SP attempts manual lock-off
- Assert
- System blocks lock-off due to Plant Operator role
- MPC warning also shown
- Cannot proceed until Operator role resolved
- Plant A must be locked off or reassigned first
TC-WORK-LOCKOFF-009: MPC (Multiple) warning clears all
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active)
- Worker is MPC for Plant A, Plant B, Plant C (multiple)
- Device is online
- Act
- SP attempts manual lock-off
- SP acknowledges MPC warning for multiple plant
- SP completes lock-off with "Ending Shift"
- Assert
- Warning displayed about MPC assignments (3 plant)
- Lock-off allowed to proceed
- ALL MPC assignments cleared (Plant A, B, C)
- Worker locked off successfully
TC-WORK-LOCKOFF-010: Not locked on blocks manual lock-off
- Arrange
- User is logged in as Site Protector (Own)
- Worker state: Not on Site
- Act
- SP attempts to select worker for manual lock-off
- Assert
- Worker not available in lock-off selection
- Or system displays error: "Worker not locked on"
- Lock-off cannot proceed
TC-WORK-LOCKOFF-011: Returning worker final lock-off
- Arrange
- User is logged in as Site Protector (Own)
- Worker state: Locked On (Returning) - previously locked off with "returning to site later"
- Worker did not return to site
- Shift needs to end
- Act
- SP selects worker from "Returning" tab
- SP performs manual lock-off
- SP selects "Ending Shift"
- SP confirms
- Assert
- Lock-off succeeds
- Shift tracking ends
- Worker state changes to Locked Off (Shift Ended)
- Worker removed from all lists
- Shift time calculated correctly (including time while "returning")
2.3 Forced Lock-off (REQ-WORK-007)
TC-WORK-FORCED-001: Forced lock-off succeeds with all checks
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active) with no plant assignments
- Worker has physically left site without locking off
- NCM authorisation obtained
- Device is online
- Act
- SP selects "Force Lock-off" for absent worker
- SP confirms worker absence verification (phone check or physical inspection)
- SP confirms NCM authorisation obtained
- SP completes forced lock-off
- Assert
- Forced lock-off succeeds
- Warning displayed explaining NCM auth requirement
- Detailed audit event recorded with:
- Worker ID and name
- Site Protector ID and name
- Timestamp
- Verification method
- NCM authorisation confirmation
- Success confirmation message distinct from standard lock-off
- Worker state changes to Locked Off (Shift Ended)
- Active count decremented
TC-WORK-FORCED-002: Incomplete verification blocks forced
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active) with no plant assignments
- NCM authorisation obtained
- Device is online
- Act
- SP initiates forced lock-off
- SP does NOT complete worker absence verification checks
- SP attempts to confirm
- Assert
- Forced lock-off blocked
- Confirm button disabled until verification complete
- Clear indication of missing verification
- Cannot proceed
TC-WORK-FORCED-003: Plant Operator blocks forced lock-off
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active) assigned as Plant Operator
- Worker has left site without locking off
- NCM authorisation obtained
- Act
- SP attempts forced lock-off with all verifications complete
- Assert
- System blocks forced lock-off
- Plant validation applies to forced lock-off same as standard
- Guidance: "Plant must be locked off or reassigned before forced lock-off"
- Cannot proceed until plant resolved
TC-WORK-FORCED-004: MPC warning allows forced lock-off
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active) assigned as MPC (single plant)
- Worker has left site without locking off
- All verifications complete, NCM auth obtained
- Act
- SP attempts forced lock-off
- SP acknowledges MPC warning
- SP completes forced lock-off
- Assert
- MPC warning displayed
- Forced lock-off allowed to proceed
- MPC assignment cleared
- Worker forcibly locked off successfully
- Distinct audit trail entry
TC-WORK-FORCED-005: Offline forced lock-off succeeds
- Arrange
- Device is offline
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active) with no plant assignments
- Worker has left site, verifications complete
- Act
- SP performs forced lock-off offline
- SP completes all verification and NCM auth confirmations
- SP confirms forced lock-off
- Assert
- Forced lock-off succeeds locally
- Full audit trail captured locally
- Worker state changes to Locked Off (Shift Ended)
- Active count decremented
- Audit event queued for sync with all details
TC-WORK-FORCED-006: SP (Other) cannot force lock-off
- Arrange
- User is logged in as Site Protector assigned to Worksite B
- Worker is Locked On (Active) to Worksite A
- Worker has left Worksite A without locking off
- Act
- SP (Other) attempts forced lock-off of worker on Worksite A
- Assert
- Access denied
- Forced lock-off action not available
- Authority boundary enforced
TC-WORK-FORCED-007: Not applicable to returning status
- Arrange
- User is logged in as Site Protector (Own)
- Worker state: Locked On (Returning) - locked off with "returning to site later"
- Worker has not returned
- Act
- SP views actions available for returning worker
- Assert
- Forced lock-off is NOT available for returning workers
- Manual lock-off with "Ending Shift" is the appropriate action
- Clear distinction in available actions
- Note: Returning workers already reported to Protector, no forced lock-off needed
2.4 Shift Status Management (REQ-WORK-008)
TC-WORK-SHIFT-001: Lock-on starts tracking and active count
- Arrange
- User is logged in as Site Protector (Own)
- Worker state: Not on Site
- Active count: 0
- Act
- SP locks on worker via QR or manual
- Assert
- Worker state changes to Locked On (Active)
- Shift tracking starts (timestamp recorded)
- Active count incremented to 1
- Worker appears in active workers list
TC-WORK-SHIFT-002: Ending shift stops tracking
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active)
- Shift tracking active
- Active count: 1
- Act
- SP locks off worker (manual or QR)
- SP selects shift status: "Ending Shift"
- SP confirms
- Assert
- Shift tracking ends immediately (end timestamp recorded)
- Worker state changes to Locked Off (Shift Ended)
- Active count decremented to 0
- Worker removed from all personnel lists
- Total shift time calculated and stored
TC-WORK-SHIFT-003: Returning continues tracking, removes from active
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active)
- Shift tracking active for 2 hours
- Active count: 3 workers
- Act
- SP locks off worker (manual or QR)
- SP selects shift status: "Returning to Site Later"
- SP confirms
- Assert
- Shift tracking continues (no end timestamp)
- Worker state changes to Locked On (Returning)
- Active count decremented to 2 (removed from active count)
- Worker moved to separate "Returning" tab/section
- NOT removed from shift tracking
- Clear visual distinction from active workers
TC-WORK-SHIFT-006: Re-lock-on continues same shift
- Arrange
- User is logged in as Site Protector (Own)
- Worker previously locked off with "Returning to Site Later" 1 hour ago
- Worker state: Locked On (Returning)
- Shift tracking continued during return period
- Active count: 2
- Act
- Worker returns to site
- SP locks on worker again (QR or manual)
- Assert
- Worker state changes to Locked On (Active)
- Same shift continues (no new shift started)
- Active count incremented to 3
- Worker moved back to active workers list
- Shift time accurately includes return period
TC-WORK-SHIFT-007: Multiple lock-off/on maintains shift
- Arrange
- User is logged in as Site Protector (Own)
- Worker starts shift, locked on at Worksite A
- Act
- Worker locks off Worksite A "Returning to Site Later"
- Worker locks on Worksite A again
- Worker locks off Worksite A "Returning to Site Later"
- Worker locks on Worksite A again
- Worker locks off Worksite A "Ending Shift"
- Assert
- Single continuous shift maintained throughout
- All lock-on/lock-off events recorded in single shift
- Shift history shows complete timeline
- No gaps in shift tracking
2.5 Plant Assignment Validation (REQ-WORK-009)
Overview: Plant validation applies to all lock-off methods (QR, Manual, Forced). Basic single plant operator blocking and single MPC warning tests are integrated into sections 2.1-2.3 above. This section covers:
- Multiple plant edge cases
- Resolution paths when blocked
- Validation reliability (offline, failure handling)
2.5.1 Multiple Plant Operator Edge Cases
TC-WORK-PLANT-002: Multiple Plant Operator blocks all
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active)
- Worker is Plant Operator for:
- Plant A
- Plant B
- All plant currently locked on
- Device is online
- Act
- SP attempts manual lock-off of worker
- Assert
- System blocks lock-off
- Error indicates multiple plant operator assignments
- All 2 plant must be resolved before lock-off
- Guidance on resolution paths
2.5.2 Multiple MPC Edge Cases
TC-WORK-PLANT-004: Multiple MPC shows warning, clears all
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active)
- Worker is MPC for:
- Plant A
- Plant B
- Plant C
- Worker is NOT Plant Operator for any plant
- All 3 plant currently locked on
- Device is online
- Act
- SP attempts manual lock-off
- Warning displayed listing all 3 MPC assignments
- SP acknowledges warning
- SP selects "Ending Shift"
- SP confirms lock-off
- Assert
- Warning clearly lists MPC assignments
- Lock-off allowed to proceed
- Worker locked off successfully
- ALL MPC assignments cleared (Plant A, B, C)
- All 3 plant remain locked on but without MPC now
2.5.3 Resolution Paths (Lock off plant / Handover)
TC-WORK-PLANT-011: Plant locked off, then worker locks off
- Arrange
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active)
- Worker is Plant Operator for Plant A
- Plant A is locked on
- Device is online
- Act
- SP locks off Plant A (via plant lock-off workflow)
- SP then attempts worker lock-off
- Assert
- Plant A lock-off succeeds
- Plant Operator assignment cleared automatically
- Worker lock-off no longer blocked
- Worker locks off successfully
- No plant validation error
- Resolution path 1 (lock off plant) works correctly
TC-WORK-PLANT-012: Plant handed over, then worker locks off
- Arrange
- User is logged in as Site Protector (Own)
- Worker A is Locked On (Active), Plant Operator for Plant X
- Worker B is Locked On (Active), available to take over
- Plant X is locked on
- Device is online
- Act
- SP initiates plant handover from Worker A to Worker B
- Plant Operator role transferred to Worker B
- SP then attempts to lock off Worker A
- Assert
- Plant handover succeeds
- Worker B now Plant Operator for Plant X
- Worker A no longer Plant Operator
- Worker A lock-off no longer blocked
- Worker A locks off successfully
- Resolution path 2 (handover plant) works correctly
- Plant X remains locked on with new operator
2.5.4 Validation Reliability
TC-WORK-PLANT-013: Offline validation
- Arrange
- Device is offline
- User is logged in as Site Protector (Own)
- Worker is Locked On (Active)
- Worker is Plant Operator for Plant A
- All data cached locally
- Act
- SP attempts manual lock-off offline
- Assert
- Plant validation runs offline using cached data
- System blocks lock-off (same as online)
- Same blocking logic applies
- Same guidance displayed
- Offline validation identical to online validation
- No degraded safety when offline