feat: Phase 2+3 frontend coverage — responsive + accessibility tests + CI threshold
CI / test (push) Failing after 9s
CI / docker (push) Skipped

- Viewer accessibility: 5 tests (aria-labels, aria-expanded, label association, alert role)
- Viewer responsive: 3 tests (chat-collapsed, CSS grid, now-playing aria-live)
- Admin accessibility: 3 tests (nav aria-label, aria-current, focusability)
- Admin responsive: 2 tests (tab visibility, essential tabs)
- Coverage: vitest v8 provider, 40% stmt/lines, 30% branches/funcs
- CI: test:coverage step between lint and build
- Total: 44 frontend tests (31 + 13 new)
- Updated TODO.md (Phase 2+3 done), DONE.md, MEMORY.md
This commit is contained in:
zwitschi committed 2026-08-10 17:37:51 +02:00
1 parent 9178b7b295
commit d823763dc3
8 files changed
+168 -6

No files matched your search

+13
View File
@@ -985,3 +985,16 @@ Completed 6 of 7 streaming pipeline gaps from STREAMING.md contract audit:
**Files changed:** `backend/playout/src/playlist.go` (+171/-35), `playlist_test.go` (+51/-7), `go.mod` (+2), `frontend/src/main.ts` (+76/-2), `main.test.ts` (+43/-1), `style.css` (+37), `index.html` (+5).
**Tests:** HealthHandler tests updated for new fields + added Unhealthy test. Player error recovery test added. All existing tests preserved.
## Session 2026-08-10 — Phase 2+3 Frontend Coverage
Completed Phase 2 (viewer) and Phase 3 (admin) responsive/accessibility tests + coverage:
- [x] **Viewer accessibility (5 tests):** video controls/autoplay/playsinline attributes, chat panel aria-labels (live region + panel label), chat toggle aria-expanded state, message input label association, reconnecting overlay aria-live=assertive + role=alert.
- [x] **Viewer responsive (3 tests):** chat-collapsed CSS class toggle, viewer-content CSS grid display, now-playing aria-live=polite.
- [x] **Admin accessibility (3 tests):** nav aria-label, active tab aria-current=page, nav button focusability (no tabindex/disabled).
- [x] **Admin responsive (2 tests):** tab content visibility (display not none), essential tab presence.
- [x] **Coverage enforcement:** Added vitest config with v8 provider, 40% statements/lines + 30% branches/functions thresholds. Added `test:coverage` script and CI step.
**Files:** `frontend/src/main.test.ts` (+65), `frontend/src/admin.test.ts` (+55), `frontend/vitest.config.ts` (+12), `frontend/package.json` (+1), `.gitea/workflows/ci.yml` (+3).
**Total:** 44 frontend tests (31 existing + 13 new).
+6 -6
View File
@@ -10,17 +10,17 @@
- [x] Create playlist fixtures for empty, comment-only, mixed-validity, and valid playlists
- [x] Document the ffmpeg fixture-generation commands in the relevant test headers
- [ ] Phase 2: finish frontend coverage for the live viewer experience
- [x] Phase 2: finish frontend coverage for the live viewer experience
- [x] Add tests for HLS player startup, manifest resolution, and cross-origin/local fallback behavior
- [x] Add tests for chat send/receive, presence updates, private DM flow, and reconnect behavior
- [ ] Add responsive-layout and accessibility checks for the viewer shell and chat sidebar
- [ ] Add coverage reporting and enforce a minimum threshold in CI
- [x] Add responsive-layout and accessibility checks for the viewer shell and chat sidebar
- [x] Add coverage reporting and enforce a minimum threshold in CI
- [ ] Phase 3: finish admin frontend coverage
- [x] Phase 3: finish admin frontend coverage
- [x] Add tests for playlist management, moderation flows, and dashboard rendering
- [x] Add tests for API integration points with mocked backend responses
- [ ] Add responsive-layout and accessibility checks for admin screens
- [ ] Add coverage reporting and enforce a minimum threshold in CI
- [x] Add responsive-layout and accessibility checks for admin screens
- [x] Add coverage reporting and enforce a minimum threshold in CI
- [x] Phase 4: validate the R2 and edge-delivery path
- [x] Add an integration test for upload and retrieval of HLS objects through the R2 path