feat(demo): add deep HTTP and browser validation layers
The existing smoke test only checked TCP port connectivity, which cannot
detect a service that accepts connections but returns errors or serves
the wrong content (exactly how the broken Kiwix slipped through).
Add two new validation layers:
1. validate-http.sh — curls every service's health/UI endpoint and
asserts both the HTTP status code AND meaningful body content (JSON
health fields like "database":"ok", XML markers, page strings). Also
verifies Kiwix has a ZIM actually loaded via its OPDS catalog feed.
2. run-browser-tests.sh — drives a real headless Chromium via the
official Playwright Docker image (no host Node install needed) to
confirm pages render correctly after JavaScript execution and SPA
hydration. Updated playwright-services.spec.ts with correct content
tokens and a waitForFunction step that reliably handles SPA timing.
Both are wired into demo-test.sh (new `http` and `browser` subcommands)
and the full test suite. AGENTS.md and demo/AGENTS.md updated with the
new commands and protocols.
💘 Generated with Crush
Assisted-by: Crush:glm-5.2
This commit is contained in:
@@ -95,6 +95,12 @@ TSYSDevStack-SupportStack-LocalWorkstation/
|
||||
|
||||
# Run network isolation tests only
|
||||
./demo/scripts/demo-test.sh network
|
||||
|
||||
# Run HTTP response validation (status code + body content)
|
||||
./demo/scripts/demo-test.sh http
|
||||
|
||||
# Run browser validation (headless Chromium via Playwright Docker image)
|
||||
./demo/scripts/demo-test.sh browser
|
||||
```
|
||||
|
||||
### Docker Operations
|
||||
|
||||
Reference in New Issue
Block a user