Verification Matrix — PWA Activate (Single‑site)
Implements: ../requirements/req-prot-001-pwa-activate-single-site.md
Requirement ↔ Scenario Index
| Requirement Ref | Requirement (short) | Scenario IDs |
|---|---|---|
| EDR-1 | Prompt confirmation on Activate | TC-PROT-SS-001 |
| EDR-2 | Confirm sets PWA Active + Worksite Enabled | TC-PROT-SS-002 |
| EDR-3 | Success message displayed | TC-PROT-SS-003 |
| EDR-4 | Audit records RPO id + timestamp | TC-PROT-SS-004 |
| SDR-1 | RPO role can access Activate | TC-PROT-SS-005 |
| SDR-2 | Single‑site permits single‑step activation | TC-PROT-SS-006, TC-PROT-SS-007 |
| SDR-3 | Enabled Worksite shows badge + Protector details | TC-PROT-SS-008 |
| SDR-4 | Active PWA shows RPO details | TC-PROT-SS-009 |
| UBI-1 | Offline operation supported | TC-PROT-SS-010 |
| UNW-1 | Prevent activation if already Active | TC-PROT-SS-011 |
Scenarios (at a glance)
| ID | Title | Type |
|---|---|---|
| TC-PROT-SS-001 (3.1.2.1) | Activate prompts confirmation | Positive |
| TC-PROT-SS-002 (3.1.2.1) | Confirm sets PWA Active and Worksite Enabled | Positive |
| TC-PROT-SS-003 (3.1.2.1) | Success message shown | Positive |
| TC-PROT-SS-004 (3.1.2.1) | Audit payload contains actor + timestamp | Positive |
| TC-PROT-SS-005 (3.1.1.1) | Non‑RPO cannot access Activate | Negative |
| TC-PROT-SS-006 (3.1.2.1) | Single‑site allows single‑step activation | Positive |
| TC-PROT-SS-007 (3.1.2.2) | Two Worksites → single‑step not offered | Edge |
| TC-PROT-SS-008 (3.1.2.1) | Enabled Worksite shows badge + Protector details | Positive |
| TC-PROT-SS-009 (3.1.2.1) | Active PWA shows RPO details | Positive |
| TC-PROT-SS-010 | Offline activation succeeds | Edge |
| TC-PROT-SS-011 | Already Active prevents activation | Defensive |
Scenario details
TC-PROT-SS-001: Activate prompts confirmation
- Arrange
- The user is logged in with the
RPOrole. - The PWA's status is
Inactive. - The PWA is configured with exactly one
Worksite.
- The user is logged in with the
- Act
- The user initiates the
Activate PWAaction.
- The user initiates the
- Assert
- The system displays a confirmation dialog.
- The PWA's status remains
Inactiveuntil the action is confirmed.
TC-PROT-SS-002: Confirm sets PWA Active and Worksite Enabled
- Arrange
- The user is logged in with the
RPOrole. - The PWA's status is
Inactive. - The PWA has exactly one
Worksite.
- The user is logged in with the
- Act
- The user confirms the activation.
- Assert
- The PWA's status changes to
Active. - The Worksite's status changes to
Enabled.
- The PWA's status changes to
TC-PROT-SS-003: Success message shown
- Arrange
- The user is logged in with the
RPOrole. - The PWA's status is
Inactive. - The PWA has exactly one
Worksite.
- The user is logged in with the
- 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
RPOrole. - The PWA's status is
Inactive. - The PWA has exactly one
Worksite.
- The user is logged in with the
- 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
RPOrole. - The PWA's status is
Inactivewith exactly oneWorksite.
- The user is authenticated without the
- Act
- The user views the PWA actions.
- Assert
- The
Activate PWAaction is not visible or is disabled.
- The
TC-PROT-SS-006: Single‑site allows single‑step activation
- Arrange
- The user is logged in with the
RPOrole. - The PWA's status is
Inactivewith exactly oneWorksite.
- The user is logged in with the
- Act
- The user views available PWA actions.
- Assert
- The
Activate PWAaction is available.
- The
TC-PROT-SS-007: Two Worksites → single‑step not offered
- Arrange
- The user is logged in with the
RPOrole. - The PWA's status is
Inactivewith twoWorksites.
- The user is logged in with the
- 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.
- The Worksite displays a status badge labelled
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
RPOrole. - The PWA's status is
Inactivewith exactly oneWorksite.
- Act
- The user activates and confirms activation.
- Assert
- The PWA transitions to
Activeand the Worksite toEnabled. - The audit event is queued locally for later sync.
- The PWA transitions to
TC-PROT-SS-011: Already Active prevents activation
- Arrange
- The PWA's status is
Activeand the Worksite isEnabled.
- The PWA's status is
- Act
- The user attempts to initiate
Activate PWA.
- The user attempts to initiate
- Assert
- The system prevents activation (control disabled or error displayed).