🎠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
- Authentication Gate Test (
/docs): - Asserts that requesting
/docswithout an active session results in an HTTP 302 redirect to/web/login?redirect=/docs. - Asserts that authenticated requests render the MkDocs Material navigation frame.
- Passwordless OTP Login Test:
- Simulates entering a test loyalty identifier and verifies the OTP input form is rendered without nested HTML form errors.
- Staff Dashboard Navigation Test:
- Verifies the presence of the "System Manuals" top menu item and ensures quick navigation across all sections.
3. Visual Screenshot Evidence Gallery
Captured screenshots from automated test runs are saved directly under docs/assets/screenshots/ and presented below:
Test Case: Unauthenticated /docs Access Protection
Status: Verified — User is redirected to /web/login when attempting to access manuals without credentials.
Test Case: Authenticated System Manuals Portal
Status: Verified — Authenticated staff can view full documentation with CPL branding.