Skip to content

🎭 Automated Playwright Test Suite & Visual Evidence

This page documents the automated visual verification suite executed by the Quality Control & Test Agent against Staging (https://angry-mad-smile.cpl.com.pg).


1. Test Architecture & Runner

The test suite leverages Playwright for Python running headless Chromium. Each test case asserts functional HTTP responses, validates DOM elements, and captures high-resolution screenshot evidence.

flowchart LR
    QC["QC Agent Runner"] --> Launch["Launch Chromium (Headless)"]
    Launch --> Suite["Run Test Scenarios"]
    Suite --> Checkpoint["Capture Screenshot Evidence"]
    Checkpoint --> Cleanup["Strict browser.close() in finally block"]
    Cleanup --> Report["Publish Report to UAT Hub"]

2. Test Cases Covered

  1. Authentication Gate Test (/docs):
  2. Asserts that requesting /docs without an active session results in an HTTP 302 redirect to /web/login?redirect=/docs.
  3. Asserts that authenticated requests render the MkDocs Material navigation frame.
  4. Passwordless OTP Login Test:
  5. Simulates entering a test loyalty identifier and verifies the OTP input form is rendered without nested HTML form errors.
  6. Staff Dashboard Navigation Test:
  7. Verifies the presence of the "System Manuals" top menu item and ensures quick navigation across all sections.

Captured screenshots from automated test runs are saved directly under docs/assets/screenshots/ and presented below:

Test Case: Unauthenticated /docs Access Protection

Login Redirect Proof Status: Verified — User is redirected to /web/login when attempting to access manuals without credentials.

Test Case: Authenticated System Manuals Portal

Authenticated Manuals Portal Status: Verified — Authenticated staff can view full documentation with CPL branding.