Skip to content

Verification Matrix — PWA Activate (Single‑site) ​

Implements: ../requirements/req-prot-001-pwa-activate-single-site.md

Requirement ↔ Scenario Index ​

Requirement RefRequirement (short)Scenario IDs
EDR-1Prompt confirmation on ActivateTC-PROT-SS-001
EDR-2Confirm sets PWA Active + Worksite EnabledTC-PROT-SS-002
EDR-3Success message displayedTC-PROT-SS-003
EDR-4Audit records RPO id + timestampTC-PROT-SS-004
SDR-1RPO role can access ActivateTC-PROT-SS-005
SDR-2Single‑site permits single‑step activationTC-PROT-SS-006, TC-PROT-SS-007
SDR-3Enabled Worksite shows badge + Protector detailsTC-PROT-SS-008
SDR-4Active PWA shows RPO detailsTC-PROT-SS-009
UBI-1Offline operation supportedTC-PROT-SS-010
UNW-1Prevent activation if already ActiveTC-PROT-SS-011

Scenarios (at a glance) ​

IDTitleType
TC-PROT-SS-001 (3.1.2.1)Activate prompts confirmationPositive
TC-PROT-SS-002 (3.1.2.1)Confirm sets PWA Active and Worksite EnabledPositive
TC-PROT-SS-003 (3.1.2.1)Success message shownPositive
TC-PROT-SS-004 (3.1.2.1)Audit payload contains actor + timestampPositive
TC-PROT-SS-005 (3.1.1.1)Non‑RPO cannot access ActivateNegative
TC-PROT-SS-006 (3.1.2.1)Single‑site allows single‑step activationPositive
TC-PROT-SS-007 (3.1.2.2)Two Worksites → single‑step not offeredEdge
TC-PROT-SS-008 (3.1.2.1)Enabled Worksite shows badge + Protector detailsPositive
TC-PROT-SS-009 (3.1.2.1)Active PWA shows RPO detailsPositive
TC-PROT-SS-010Offline activation succeedsEdge
TC-PROT-SS-011Already Active prevents activationDefensive

Scenario details ​

TC-PROT-SS-001: Activate prompts confirmation
  • Arrange
    • The user is logged in with the RPO role.
    • The PWA's status is Inactive.
    • The PWA is configured with exactly one Worksite.
  • Act
    • The user initiates the Activate PWA action.
  • Assert
    • The system displays a confirmation dialog.
    • The PWA's status remains Inactive until the action is confirmed.

TC-PROT-SS-002: Confirm sets PWA Active and Worksite Enabled
  • Arrange
    • The user is logged in with the RPO role.
    • The PWA's status is Inactive.
    • The PWA has exactly one Worksite.
  • Act
    • The user confirms the activation.
  • Assert
    • The PWA's status changes to Active.
    • The Worksite's status changes to Enabled.

TC-PROT-SS-003: Success message shown
  • Arrange
    • The user is logged in with the RPO role.
    • The PWA's status is Inactive.
    • The PWA has exactly one Worksite.
  • Act
    • The user confirms the activation.
  • Assert
    • The system displays a success toast/banner.

TC-PROT-SS-004: Audit payload contains actor + timestamp
  • Arrange
    • The user is logged in with the RPO role.
    • The PWA's status is Inactive.
    • The PWA has exactly one Worksite.
  • Act
    • The user activates and confirms activation.
  • Assert
    • An audit event is recorded with the activating user's identifier and a timestamp.

TC-PROT-SS-005: Non‑RPO cannot access Activate
  • Arrange
    • The user is authenticated without the RPO role.
    • The PWA's status is Inactive with exactly one Worksite.
  • Act
    • The user views the PWA actions.
  • Assert
    • The Activate PWA action is not visible or is disabled.

TC-PROT-SS-006: Single‑site allows single‑step activation
  • Arrange
    • The user is logged in with the RPO role.
    • The PWA's status is Inactive with exactly one Worksite.
  • Act
    • The user views available PWA actions.
  • Assert
    • The Activate PWA action is available.

TC-PROT-SS-007: Two Worksites → single‑step not offered
  • Arrange
    • The user is logged in with the RPO role.
    • The PWA's status is Inactive with two Worksites.
  • Act
    • The user views available PWA actions.
  • Assert
    • Single‑step activation that enables a Worksite is not available.

TC-PROT-SS-008: Enabled Worksite shows badge + Protector details
  • Arrange
    • The PWA has been activated in a single‑site scenario.
  • Act
    • The user views the Worksite card/details.
  • Assert
    • The Worksite displays a status badge labelled Enabled.
    • The Protector's name and phone number are visible.

TC-PROT-SS-009: Active PWA shows RPO details
  • Arrange
    • The PWA has been activated.
  • Act
    • The user views the PWA header/details.
  • Assert
    • The activating RPO's name and phone number are visible.

TC-PROT-SS-010: Offline activation succeeds
  • Arrange
    • The device is offline, and required data is cached locally.
    • The user is logged in with the RPO role.
    • The PWA's status is Inactive with exactly one Worksite.
  • Act
    • The user activates and confirms activation.
  • Assert
    • The PWA transitions to Active and the Worksite to Enabled.
    • The audit event is queued locally for later sync.

TC-PROT-SS-011: Already Active prevents activation
  • Arrange
    • The PWA's status is Active and the Worksite is Enabled.
  • Act
    • The user attempts to initiate Activate PWA.
  • Assert
    • The system prevents activation (control disabled or error displayed).

Internal use only