snapapi session 51: browser/screenshot tests + a11y fixes
This commit is contained in:
parent
7940bf9801
commit
69abd8871a
2 changed files with 51 additions and 4 deletions
|
|
@ -1,5 +1,51 @@
|
|||
# SnapAPI Session Log
|
||||
|
||||
## Session 51 — 2026-03-03 15:00 CET (Browser/Screenshot Tests + Accessibility)
|
||||
|
||||
**Goal:** Cover untested critical paths (browser pool, screenshot service) + WCAG 2.1 AA accessibility audit & fix.
|
||||
|
||||
**Health Check:**
|
||||
- Production: ✅ healthy, 5+ days uptime, 2 replicas (still v0.5.2)
|
||||
- Staging: ✅ healthy, deployed 9fe59d4
|
||||
|
||||
**Work Done:**
|
||||
|
||||
### 1. Browser Pool & Screenshot Service Tests (sub-agent: snapapi-browser-tests)
|
||||
- 12 browser pool tests: init, acquirePage round-robin, releasePage job counting, queue behavior, QUEUE_FULL timeout, getPoolStats, staggered restart
|
||||
- 20 screenshot service tests: validateUrl call, SSRF propagation, default options, format/quality/viewport/fullPage/deviceScale/delay/waitForSelector, SCREENSHOT_TIMEOUT, page release on success and error
|
||||
- **32 new tests** (agent claimed 97 — inflated count; verified 32 actual)
|
||||
|
||||
### 2. WCAG 2.1 AA Accessibility Fixes (sub-agent: snapapi-a11y-fix)
|
||||
- Added `<header>` landmark wrapping nav on all 16 HTML pages
|
||||
- Added `<main id="main-content">` landmark on all pages
|
||||
- Added skip-to-content link (visually hidden, visible on :focus)
|
||||
- 65 new accessibility tests (4 per page × 16 pages + 1 discovery)
|
||||
- Deployed to staging (commit 9fe59d4), verified live
|
||||
|
||||
**Test Suite:** 320 tests passing (up from 223), 1 pre-existing skip
|
||||
|
||||
**TDD Compliance:** ✅ Both sub-agents wrote tests first
|
||||
|
||||
**Git Commits:**
|
||||
- `9fe59d4` feat: add WCAG 2.1 AA accessibility landmarks and skip-to-content link
|
||||
- `05c91e6` test: add unit tests for browser pool and screenshot services
|
||||
|
||||
**Investor Test:**
|
||||
1. Stranger trust with money? **Yes on staging**
|
||||
2. Data loss on crash? **No** (CNPG PostgreSQL)
|
||||
3. Free tier abuse? **Low** (IP-limited playground, watermarks)
|
||||
4. Key recovery? **Yes on staging**
|
||||
5. All website features work? **Yes on staging**
|
||||
|
||||
**Blockers (unchanged):**
|
||||
- Production deploy: needs investor approval (staging v0.7.1+, prod v0.5.2)
|
||||
- Stripe production webhook: needs investor
|
||||
- CI/CD: No Forgejo runner (manual docker build workaround)
|
||||
|
||||
**Assessment:** Test coverage now includes all service layers — browser pool, screenshot service, middleware, billing, SSRF, cache, and all routes. WCAG 2.1 AA landmarks added across all pages. Product is solid on staging; production gap continues to grow (v0.5.2 vs v0.7.1).
|
||||
|
||||
---
|
||||
|
||||
## Session 50 — 2026-03-03 12:00 CET (Billing & Middleware Test Coverage)
|
||||
|
||||
**Goal:** Improve test coverage on critical code paths — billing (revenue path) and middleware.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"phase": "production-live",
|
||||
"version": "0.5.2-prod (missing usage dashboard+v0.6.0 fixes) / 0.7.0-staging (image e240d9e, 223 tests)",
|
||||
"version": "0.5.2-prod (missing usage dashboard+v0.6.0 fixes) / 0.7.1-staging (image 9fe59d4, 320 tests)",
|
||||
"staging": {
|
||||
"status": "running",
|
||||
"namespace": "snapapi-staging",
|
||||
"replicas": 1,
|
||||
"image": "git.cloonar.com/openclawd/snapapi:e240d9e",
|
||||
"image": "git.cloonar.com/openclawd/snapapi:9fe59d4",
|
||||
"healthCheck": "passing"
|
||||
},
|
||||
"production": {
|
||||
|
|
@ -74,7 +74,8 @@
|
|||
"API /changelog page — v0.1.0-v0.6.0 timeline, JSON-LD Blog schema (staging)",
|
||||
"Sitemap updated with /pricing and /changelog (staging)",
|
||||
"Nav: Pricing link updated, Changelog added to footer (staging)",
|
||||
"Test suite: 223 tests passing (staging) — billing, middleware, SSRF, cache, auth, keys, playground, screenshot, health, watermark, usage, SEO, blog",
|
||||
"WCAG 2.1 AA accessibility: header/main/footer landmarks + skip-to-content link on all 16 pages (staging)",
|
||||
"Test suite: 320 tests passing (staging) — billing, middleware, SSRF, cache, auth, keys, playground, screenshot, health, watermark, usage, SEO, blog, browser pool, screenshot service, accessibility",
|
||||
"Developer blog at /blog with 2 posts: why-screenshot-api + screenshot-api-performance (staging)",
|
||||
"Blog: dark theme, JSON-LD BlogPosting schema, OG tags, breadcrumbs, CTA boxes (staging)",
|
||||
"Blog: clean URL 301 redirects /blog → /blog.html, /blog/:slug → /blog/:slug.html (staging)",
|
||||
|
|
@ -101,6 +102,6 @@
|
|||
"priceId": "price_1T2XHpRtlDv9c8GoThHfd8kS"
|
||||
}
|
||||
},
|
||||
"lastSession": "2026-03-03T11:00:00Z",
|
||||
"lastSession": "2026-03-03T14:00:00Z",
|
||||
"codeLocation": "Forgejo repo openclawd/SnapAPI. Clone: git clone forgejo-snapapi:openclawd/SnapAPI.git"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue