veza/docs/SMOKE_TEST_V0703.md
senke da20e83e09 docs: complete roadmap documentation v0.703 to v0.903 (v1.0 target)
Add Release Scope, Implementation Plan, and Smoke Test for 7 versions:
- v0.703: Go Live & Streaming Complet (Phase 7 Finale)
- v0.801: UX/UI Polish, Accessibilite & PWA (Phase 8)
- v0.802: Cloud Complet, Fichiers & Gear Avance (Phase 8)
- v0.803: Securite, Compliance & Outillage Dev (Phase 8)
- v0.901: Marketplace Complet & Analytics Avances (Phase 9)
- v0.902: Social Complet, Chat & Notifications (Phase 9)
- v0.903: Stabilisation v1.0 & Launch Readiness (Phase 9)

21 documents total (3 per version), covering all remaining features
needed to reach v1.0 from v0.702.
2026-02-24 01:32:04 +01:00

232 lines
5.7 KiB
Markdown

# Smoke Test v0.703 — Go Live & Streaming Complet
## Prérequis
- `veza-backend-api` compilé et démarré (`go run ./cmd/api`)
- PostgreSQL avec migrations appliquées jusqu'à 117
- `.env` avec `DATABASE_URL`, `JWT_SECRET`
- Utilisateur enregistré avec token JWT valide
---
## 1. Stream Key Management (GL1)
### 1.1 Obtenir sa stream key
```bash
curl -s http://localhost:8080/api/v1/live/streams/me/key \
-H "Authorization: Bearer {TOKEN}" | jq .
# Attendu: { "success": true, "data": { "stream_key": "uuid-format", "rtmp_url": "rtmp://stream.veza.app/live" } }
```
### 1.2 Régénérer sa stream key
```bash
curl -s -X POST http://localhost:8080/api/v1/live/streams/me/key/regenerate \
-H "Authorization: Bearer {TOKEN}" | jq .
# Attendu: 200, nouvelle stream_key différente de la précédente
```
### 1.3 Stream key sans auth
```bash
curl -s http://localhost:8080/api/v1/live/streams/me/key | jq .
# Attendu: 401 Unauthorized
```
---
## 2. Create & Update Stream (GL1)
### 2.1 Créer un stream
```bash
curl -s -X POST http://localhost:8080/api/v1/live/streams \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{"title": "My First Stream", "description": "Testing Go Live", "category": "music", "tags": ["beats", "live"]}' | jq .
# Attendu: 201 Created, stream avec id, stream_key (absent du JSON car json:"-"), title, tags
```
### 2.2 Lister mes streams
```bash
curl -s http://localhost:8080/api/v1/live/streams/me \
-H "Authorization: Bearer {TOKEN}" | jq .
# Attendu: { "success": true, "data": { "streams": [...] } }
# Attendu: stream_key visible dans la réponse (endpoint protégé)
```
### 2.3 Mettre à jour un stream
```bash
curl -s -X PUT http://localhost:8080/api/v1/live/streams/{STREAM_ID} \
-H "Authorization: Bearer {TOKEN}" \
-H "Content-Type: application/json" \
-d '{"title": "Updated Title", "description": "New description"}' | jq .
# Attendu: 200, stream avec titre mis à jour
```
### 2.4 Update ownership check
```bash
# Utiliser un token d'un autre utilisateur
curl -s -X PUT http://localhost:8080/api/v1/live/streams/{STREAM_ID} \
-H "Authorization: Bearer {OTHER_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"title": "Hijack"}' | jq .
# Attendu: 404/403, "stream not found"
```
---
## 3. List & VOD (GL1)
### 3.1 Lister les streams live
```bash
curl -s "http://localhost:8080/api/v1/live/streams?is_live=true" | jq .
# Attendu: 200, streams avec is_live=true uniquement
```
### 3.2 Lister tous les streams (inclut VOD)
```bash
curl -s "http://localhost:8080/api/v1/live/streams" | jq .
# Attendu: 200, tous les streams (live et terminés)
```
### 3.3 Détail d'un stream
```bash
curl -s http://localhost:8080/api/v1/live/streams/{STREAM_ID} | jq .
# Attendu: 200, stream details (stream_key absent du JSON public)
```
---
## 4. Go Live Frontend (GL2)
### 4.1 Page Go Live accessible
```bash
# Frontend: naviguer vers /live/go-live (authentifié)
# Vérifier: formulaire avec titre, description, catégorie, tags
# Vérifier: stream key masquée par défaut
# Vérifier: bouton "Reveal" affiche la stream key
# Vérifier: bouton "Copy" copie dans le clipboard
# Vérifier: instructions OBS/Streamlabs visibles
```
### 4.2 Navbar Go Live
```bash
# Frontend: cliquer sur "Go Live" dans le menu utilisateur de la Navbar
# Vérifier: navigation vers /live/go-live (PAS de toast "coming soon")
```
### 4.3 Lazy loading
```bash
# Ouvrir DevTools → Network
# Naviguer vers /live/go-live
# Vérifier: chunk GoLivePage chargé dynamiquement
```
### 4.4 Regenerate key
```bash
# Sur la page Go Live, cliquer "Regenerate"
# Vérifier: la stream key change
# Vérifier: toast de confirmation
```
---
## 5. Live Chat (GL3)
### 5.1 Chat connecté WebSocket
```bash
# Frontend: naviguer vers /live (page streams)
# Sélectionner un stream actif
# Vérifier: le chat affiche des messages en temps réel (si WebSocket actif)
# Vérifier: l'input de message envoie un message
```
### 5.2 Join/leave
```bash
# Naviguer vers un stream → observer "joined" dans le chat
# Quitter la page → observe "left" côté serveur (via WebSocket disconnect)
```
---
## 6. Player Enhancements (GL4)
### 6.1 Playback speed
```bash
# Frontend: lancer une track dans le player
# Vérifier: bouton de vitesse visible (1x par défaut)
# Cliquer: cycle 0.5x → 0.75x → 1x → 1.25x → 1.5x → 2x
# Vérifier: la vitesse de lecture change effectivement
```
### 6.2 Media Session API
```bash
# Lancer une track dans le player
# Vérifier: notification OS affiche titre + artiste + artwork
# Vérifier: boutons play/pause/next/previous fonctionnent depuis la notification
# Note: Media Session API requiert HTTPS en production ; test en localhost fonctionne
```
---
## 7. MSW (Storybook)
### 7.1 Stories GoLiveView
```bash
cd apps/web && npm run storybook
# Naviguer vers Features/Live/GoLiveView
# Vérifier: Default (formulaire + stream key), Loading (skeleton), Error, StreamKeyVisible
```
### 7.2 MSW live handlers
```bash
# En mode MSW (npm run dev), naviguer vers /live/go-live
# Vérifier: stream key mockée s'affiche
# Vérifier: regenerate retourne une nouvelle key mockée
```
---
## 8. Tests automatisés
### 8.1 Backend
```bash
cd veza-backend-api && go test ./internal/services/... -v -run "LiveStream"
# Attendu: 9 tests pass
```
### 8.2 Frontend build
```bash
cd apps/web && npm run build
# Attendu: 0 errors
```
---
## 9. Documentation
- [ ] `docs/API_REFERENCE.md` contient section Live Streaming (7 endpoints)
- [ ] `CHANGELOG.md` contient entrée v0.703
- [ ] `docs/PROJECT_STATE.md` : Dernier tag = v0.703
- [ ] `docs/FEATURE_STATUS.md` : limitation Go Live supprimée, section "Livré en v0.703"
- [ ] `git tag v0.703` créé sur le bon commit