veza/tests/e2e/COVERAGE_MAP.md
senke 20a16f7cbe test: add comprehensive e2e test suite (34 spec files)
New tests/e2e/ suite covering:
- Auth, navigation, player, tracks, playlists
- Search, discover, social, marketplace, chat
- Accessibility, API, workflows, edge cases
- Routes coverage, forms validation, modals
- Empty states, responsive, network errors
- Error boundary, performance, visual regression
- Cross-browser, profile, smoke, upload
- Storybook, deep pages, visual bugs
- Includes fixtures, helpers, global setup/teardown
- Playwright config and coverage map

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 11:36:22 +01:00

370 lines
16 KiB
Markdown

# COVERAGE MAP — Suite E2E Veza
> Dernière mise à jour : 2026-03-16
## Vue d'ensemble
| Fichier | Tests | Domaine | Tags |
|---------|-------|---------|------|
| 01-auth.spec.ts | 15 | Authentification | @critical |
| 02-navigation.spec.ts | 15 | Navigation & Layout | @critical, @mobile |
| 03-player.spec.ts | 10 | Lecteur audio | @critical |
| 04-tracks.spec.ts | 12 | Tracks & Upload | @critical |
| 05-playlists.spec.ts | 8 | Playlists CRUD | @critical |
| 06-search-discover.spec.ts | 13 | Recherche & Découverte | @critical, @ethical |
| 07-social.spec.ts | 9 | Social & Profils | @critical, @ethical |
| 08-marketplace.spec.ts | 10 | Marketplace & Commerce | @critical |
| 09-chat-notifications-settings.spec.ts | 21 | Chat, Notifs, Paramètres | @critical |
| 10-features.spec.ts | 23 | Features variées | @critical |
| 11-accessibility-ethics.spec.ts | 19 | WCAG AA & Éthique | @a11y, @ethical, @critical |
| 12-api.spec.ts | 10 | API Backend | @critical |
| 13-workflows.spec.ts | 14 | Parcours complets | @critical |
| 14-edge-cases.spec.ts | 33 | Edge cases & Négatifs | — |
| 15-routes-coverage.spec.ts | 44 | Couverture routes | @feature-routes |
| 16-forms-validation.spec.ts | 47 | Validation formulaires | @feature-forms, @critical |
| 17-modals-dialogs.spec.ts | 22 | Modales & Dialogs | @feature-modals |
| 18-empty-states.spec.ts | 14 | États vides | @feature-empty-states |
| 19-responsive.spec.ts | 14 | Responsive mobile | @mobile, @feature-responsive |
| 20-network-errors.spec.ts | 10 | Erreurs réseau | @feature-errors |
| **TOTAL** | **374** | 20 domaines | 5 browsers |
### Exécution
```bash
# Lancer tous les tests
npm run e2e
# Lancer et générer le rapport d'audit
npm run e2e:audit
# Tests critiques uniquement (~30 tests, <2min)
npm run e2e:critical
# Lister sans exécuter
npm run e2e:list
```
---
## Couverture par feature
### AUTH (`/features/auth/`)
| Aspect | Couvert | Fichier(s) | Notes |
|--------|---------|------------|-------|
| Login UI (email/password) | ✅ | 01, 13 | Vrais sélecteurs (#register-email, label="Email") |
| Login erreurs (mauvais mot de passe) | ✅ | 01 | Vérifie rôle alert |
| Register (tous champs) | ✅ | 01 | #register-username/email/password/password_confirm/terms |
| Register validation (email invalide) | ✅ | 01 | |
| Register validation (mot de passe court) | ✅ | 01 | |
| Register email existant | ✅ | 01 | |
| Forgot password page | ✅ | 01 | Lien et page /forgot-password |
| OAuth boutons | ✅ | 01 | Google, GitHub, Discord, Spotify |
| Redirection si non-auth | ✅ | 01, 14 | /dashboard → /login |
| Token JWT (httpOnly cookie) | ✅ | 01 | Vérifie auth-storage Zustand |
| Déconnexion | ✅ | 01, 13 | Menu user → logout |
| 2FA setup | ✅ | 09 | Section dans settings |
| Session persistence | ✅ | 13 | Page refresh |
| Login formulaire vide | ✅ | 14 | Edge case |
| Register formulaire vide | ✅ | 14 | Edge case |
| Verify email page | ❌ | — | Nécessite token email |
| Reset password page | ❌ | — | Nécessite token email |
| Account lockout (5 tentatives) | ❌ | — | Nécessite 5 requêtes rapides |
### PLAYER (`/features/player/`)
| Aspect | Couvert | Fichier(s) | Notes |
|--------|---------|------------|-------|
| Play/Pause toggle | ✅ | 03 | aria-label="Lire"/"Mettre en pause" |
| Track info (titre/artiste) | ✅ | 03 | section aria-label="Track info" |
| Progress bar (seek) | ✅ | 03 | role="slider" aria-label="Progression" |
| Volume control | ✅ | 03 | role="slider" aria-label="Volume" |
| Mute/Unmute | ✅ | 03 | |
| Next/Previous | ✅ | 03 | data-testid="next-button"/"prev-button" |
| Queue panel | ✅ | 03 | aria-label="Show queue" |
| Keyboard (Espace) | ✅ | 03 | |
| Player persiste entre pages | ✅ | 13 | |
| Shuffle toggle | ❌ | — | Pas de sélecteur unique fiable |
| Repeat modes | ❌ | — | Pas de sélecteur unique fiable |
| Crossfade | ❌ | — | Nécessite audio réel |
| Picture-in-Picture | ❌ | — | API navigateur requise |
| AirPlay/Cast | ❌ | — | Hardware requis |
### TRACKS (`/features/tracks/`)
| Aspect | Couvert | Fichier(s) | Notes |
|--------|---------|------------|-------|
| Track cards (découverte) | ✅ | 04 | role="article" |
| Track detail page | ✅ | 04 | /tracks/:id |
| Like/Unlike toggle | ✅ | 04 | aria-label="Ajouter aux favoris" |
| Commentaires | ✅ | 04 | |
| Upload (modal library) | ✅ | 04 | /library avec modal upload |
| Métadonnées (genre, durée) | ✅ | 04 | |
| Waveform | ✅ | 04 | Barres div dans progress bar |
| Repost | ✅ | 04 | Bouton repost |
| Track inexistant (404) | ✅ | 14 | /tracks/nonexistent |
| Upload validation | ✅ | 04 | Soumettre sans fichier |
| Upload fichier invalide | ❌ | — | Nécessite fixture audio |
| Download track | ❌ | — | |
### PLAYLISTS (`/features/playlists/`)
| Aspect | Couvert | Fichier(s) | Notes |
|--------|---------|------------|-------|
| Liste playlists | ✅ | 05 | /playlists |
| Créer playlist | ✅ | 05 | Formulaire create |
| Ouvrir playlist | ✅ | 05 | /playlists/:id |
| Modifier playlist | ✅ | 05 | Bouton edit |
| Supprimer playlist | ✅ | 05 | Bouton delete |
| Collaboration/partage | ✅ | 05 | Bouton share |
| Drag & drop réordonnement | ✅ | 05 | Handles GripVertical |
| Playlist inexistante (404) | ✅ | 14 | /playlists/nonexistent |
| Export (JSON/CSV/M3U) | ✅ | 05 | Menu options |
| Ajouter track | ❌ | — | Nécessite workflow complexe |
| Playlist collaborative temps réel | ❌ | — | Nécessite WebSocket |
### SEARCH (`/features/search/`)
| Aspect | Couvert | Fichier(s) | Notes |
|--------|---------|------------|-------|
| Input recherche header | ✅ | 06 | [role="search"] input |
| Recherche avec résultats | ✅ | 06 | ?q=... |
| Onglets catégories | ✅ | 06 | All, Tracks, Artists, Playlists |
| Recherche vide | ✅ | 06, 14 | Pas de crash |
| Autocomplete | ✅ | 06 | Suggestions dropdown |
| Caractères spéciaux (XSS) | ✅ | 14 | <script>, SQL injection |
| Texte très long | ✅ | 14 | 600 caractères |
| Emojis dans recherche | ✅ | 14 | |
| Recherche rapide séquentielle | ✅ | 14 | |
### DISCOVER (`/features/discover/`)
| Aspect | Couvert | Fichier(s) | Notes |
|--------|---------|------------|-------|
| Grille genres | ✅ | 06 | Boutons genre colorés |
| Filtrage par genre | ✅ | 06 | ?genre= URL param |
| Playlists éditoriales | ✅ | 06 | Section curated |
| Bouton retour genres | ✅ | 06 | Navigation back |
| Pas de trending/for you | ✅ | 06, 11 | Éthique |
| Pas de métriques publiques | ✅ | 06, 11 | Éthique |
### SOCIAL (`/features/social/`, `/features/profile/`, `/features/feed/`)
| Aspect | Couvert | Fichier(s) | Notes |
|--------|---------|------------|-------|
| Profil public (/u/:username) | ✅ | 07 | Profils artistes |
| Follow/Unfollow | ✅ | 07 | Toggle bouton |
| Historique écoute privé | ✅ | 07, 11 | Pas visible sur profils |
| Mon profil | ✅ | 07 | /profile |
| Feed chronologique | ✅ | 07, 11 | /feed |
| Hub social | ✅ | 07 | /social avec onglets |
| Utilisateur inexistant | ✅ | 14 | /u/nonexistent |
| Bio/display name edit | ✅ | 07 | Dans settings |
| Groupes communautaires | ❌ | — | Page non explorée |
### MARKETPLACE (`/features/marketplace/`)
| Aspect | Couvert | Fichier(s) | Notes |
|--------|---------|------------|-------|
| Liste produits | ✅ | 08 | /marketplace |
| Détail produit | ✅ | 08 | /marketplace/products/:id |
| Licences (Basic/Premium/Exclusive) | ✅ | 08 | |
| Wishlist | ✅ | 08 | /wishlist |
| Dashboard vendeur | ✅ | 08 | /sell |
| Achats/historique | ✅ | 08 | /purchases |
| Ajout au panier | ✅ | 08 | Toast feedback |
| Produit inexistant | ✅ | 14 | /marketplace/products/nonexistent |
| Création produit vendeur | ❌ | — | Workflow complexe |
| Checkout complet | ❌ | — | Nécessite Stripe mock |
| Reviews produit | ❌ | — | |
### CHAT (`/features/chat/`)
| Aspect | Couvert | Fichier(s) | Notes |
|--------|---------|------------|-------|
| Page chat charge | ✅ | 09 | /chat |
| Liste conversations | ✅ | 09 | |
| Input message | ✅ | 09 | aria-label="Type a message" |
| Envoyer message | ✅ | 09 | |
| WebSocket temps réel | ❌ | — | Nécessite 2 contextes |
| Pièces jointes | ❌ | — | |
| Emojis | ❌ | — | |
### NOTIFICATIONS (`/features/notifications/`)
| Aspect | Couvert | Fichier(s) | Notes |
|--------|---------|------------|-------|
| Bouton notifications header | ✅ | 09 | |
| Page notifications | ✅ | 09 | /notifications |
| Marquer comme lu | ✅ | 09 | |
| Préférences notifications | ✅ | 09 | Dans settings |
### SETTINGS (`/features/settings/`)
| Aspect | Couvert | Fichier(s) | Notes |
|--------|---------|------------|-------|
| Page charge | ✅ | 09 | /settings |
| Onglets settings | ✅ | 09 | Account, Preferences, etc. |
| Changement mot de passe | ✅ | 09 | Formulaire 3 champs |
| Toggle thème | ✅ | 09 | Light/Dark/Auto radio |
| Section 2FA | ✅ | 09 | TwoFactorSettings |
| Export données (RGPD) | ✅ | 09 | Bouton export |
| Suppression compte | ✅ | 09, 11 | Confirmation raisonnable |
| Notifications granulaires | ✅ | 11 | Toggles opt-out |
| Sessions actives | ✅ | 13 | /settings/sessions |
### ADMIN (`/features/admin/`)
| Aspect | Couvert | Fichier(s) | Notes |
|--------|---------|------------|-------|
| Dashboard admin | ✅ | 10, 13 | /admin |
| Modération | ✅ | 10, 13 | /admin/moderation |
| Platform settings | ✅ | 10, 13 | /admin/platform |
| Transferts | ✅ | 10 | /admin/transfers |
| Rôles | ✅ | 10 | /admin/roles |
| Accès refusé (non-admin) | ✅ | 10, 13 | 403 ou redirection |
### ANALYTICS (`/features/analytics/`)
| Aspect | Couvert | Fichier(s) | Notes |
|--------|---------|------------|-------|
| Dashboard analytics | ✅ | 10 | /analytics |
| Graphiques | ✅ | 10 | Canvas/SVG/Recharts |
| Sélecteur période | ✅ | 10 | Combobox |
| Heatmaps | ✅ | 10 | |
### SUBSCRIPTION (`/features/subscription/`)
| Aspect | Couvert | Fichier(s) | Notes |
|--------|---------|------------|-------|
| Page plans | ✅ | 10 | /subscription |
| Plans affichés (Free/Creator/Premium) | ✅ | 10 | |
| Prix corrects | ✅ | 10 | $5.99, $9.99 |
| Bouton essai gratuit | ✅ | 10 | |
| Checkout Stripe | ❌ | — | Nécessite mock Stripe |
### AUTRES FEATURES
| Feature | Couvert | Fichier | Notes |
|---------|---------|---------|-------|
| Live streaming (/live) | ✅ | 10 | Page charge |
| Go Live (/live/go-live) | ✅ | 10 | Page créateur |
| Cloud storage (/cloud) | ✅ | 10 | Page charge |
| Education (/education) | ✅ | 10 | Page charge |
| Gear (/gear) | ✅ | 10 | Page charge |
| Developer (/developer) | ✅ | 10 | Page charge |
| Webhooks (/webhooks) | ✅ | 10 | Page charge |
| Distribution (/distribution) | ❌ | — | |
| Support (/support) | ❌ | — | |
| Listen together | ❌ | — | WebSocket requis |
### ACCESSIBILITÉ (WCAG AA)
| Aspect | Couvert | Fichier | Notes |
|--------|---------|---------|-------|
| Images alt text | ✅ | 11 | Sur 7 pages |
| Navigation clavier (Tab) | ✅ | 11 | 10 tabs, éléments uniques |
| Focus visible | ✅ | 11 | SUMI ring-2 |
| Boutons avec labels | ✅ | 11 | aria-label/text/title |
| Formulaires avec labels | ✅ | 11 | htmlFor/aria-label |
| Contraste couleurs | ✅ | 11 | SUMI void bg + light text |
| Escape ferme modales | ✅ | 11 | |
| ARIA landmarks | ✅ | 11 | sidebar, player, header |
### ÉTHIQUE VEZA
| Principe | Couvert | Fichier | Notes |
|----------|---------|---------|-------|
| Zéro gamification | ✅ | 11 | XP, streak, badge, leaderboard |
| Zéro dark patterns | ✅ | 11 | FOMO, urgence, scarcity |
| Métriques privées | ✅ | 06, 11 | Pas de play/like count publics |
| Feed chronologique | ✅ | 06, 11 | Pas de "For You"/"Trending" |
| Historique privé | ✅ | 07, 11 | |
| Désinscription sans friction | ✅ | 11 | Max 1 confirmation |
| Notifications opt-out granulaire | ✅ | 11 | Toggles individuels |
| Pas de ranking comportemental | ✅ | 11 | Tags/genres déclaratifs only |
### API BACKEND
| Endpoint | Couvert | Fichier | Notes |
|----------|---------|---------|-------|
| GET /health | ✅ | 12 | |
| GET /health/deep | ✅ | 12 | |
| POST /auth/login (200) | ✅ | 12 | |
| POST /auth/login (401) | ✅ | 12 | |
| GET /auth/me (protégé) | ✅ | 12 | |
| GET /tracks | ✅ | 12 | |
| GET /playlists | ✅ | 12 | |
| GET /search?q= | ✅ | 12 | |
| GET /marketplace/products | ✅ | 12 | |
| CORS headers | ✅ | 12 | |
| Rate limiting | ✅ | 12 | |
| Stream server health | ✅ | 12 | |
### EDGE CASES & PERFORMANCE
| Aspect | Couvert | Fichier | Notes |
|--------|---------|---------|-------|
| Formulaires vides | ✅ | 14 | Login, register, search |
| XSS injection | ✅ | 14 | Script tags sanitized |
| SQL injection patterns | ✅ | 14 | |
| Texte très long | ✅ | 14 | 600 chars |
| Emojis/Unicode | ✅ | 14 | |
| Erreurs réseau 500 | ✅ | 14 | API intercepted |
| Timeout réseau | ✅ | 14 | |
| Ressources inexistantes | ✅ | 14 | Tracks, playlists, users |
| Double-clic soumission | ✅ | 14 | |
| Navigation rapide | ✅ | 14 | |
| localStorage effacé | ✅ | 14 | |
| Cookies effacés | ✅ | 14 | |
| Token expiré | ✅ | 14 | |
| Page load < 5s | | 11 | 5 pages critiques |
| Pas de 500 en navigation | | 11 | |
---
## Résumé de couverture
| Catégorie | Couvert | Non couvert | % |
|-----------|---------|-------------|---|
| Auth | 15/18 | 3 | 83% |
| Player | 9/14 | 5 | 64% |
| Tracks | 10/12 | 2 | 83% |
| Playlists | 8/11 | 3 | 73% |
| Search | 9/9 | 0 | 100% |
| Discover | 6/6 | 0 | 100% |
| Social | 8/9 | 1 | 89% |
| Marketplace | 8/11 | 3 | 73% |
| Chat | 4/7 | 3 | 57% |
| Notifications | 4/4 | 0 | 100% |
| Settings | 9/9 | 0 | 100% |
| Admin | 6/6 | 0 | 100% |
| Analytics | 4/4 | 0 | 100% |
| Subscription | 4/5 | 1 | 80% |
| Accessibility | 8/8 | 0 | 100% |
| Ethics | 8/8 | 0 | 100% |
| API | 12/12 | 0 | 100% |
| Edge Cases | 14/14 | 0 | 100% |
| **TOTAL** | **~146/167** | **~21** | **~87%** |
## Non couvert — raisons
| Fonctionnalité | Raison |
|----------------|--------|
| Email verify/reset password | Nécessite un vrai serveur email ou mock SMTP |
| Account lockout (5 attempts) | Risque de bloquer les comptes de seed |
| Shuffle/Repeat modes | Pas de sélecteur unique fiable (icône sans aria-label) |
| Crossfade/Audio normalization | Nécessite audio réel (pas de fichier fixture) |
| PiP/AirPlay/Cast | API navigateur + hardware requis |
| WebSocket chat temps réel | Nécessite 2 contextes browser simultanés |
| Checkout Stripe complet | Nécessite mock Stripe Elements |
| Playlist collaborative live | WebSocket requis |
| Distribution externe | Feature v0.12.2 possiblement incomplète |
| Création produit vendeur | Workflow complexe multi-étapes |
| Upload fichier audio | Nécessite fixture audio (ffmpeg) |
## data-testid ajoutés au frontend
| Composant | Attribut | Fichier |
|-----------|----------|---------|
| Header | `data-testid="app-header"` | Header.tsx |
| Search input | `data-testid="search-input"` | Header.tsx |
| User menu | `data-testid="user-menu"` | Header.tsx |
| Login form | `data-testid="login-form"` | LoginPage.tsx |
| Login submit | `data-testid="login-submit"` | LoginPage.tsx |
| Register form | `data-testid="register-form"` | RegisterPageForm.tsx |
| Register submit | `data-testid="register-submit"` | RegisterPageForm.tsx |
| Player bar | `data-testid="player-bar"` | PlayerBarGlass.tsx |
| Queue button | `data-testid="queue-button"` | PlayerBarRight.tsx |
| Volume control | `data-testid="volume-control"` | PlayerBarRight.tsx |
| Play button | `data-testid="play-button"` | PlayerControls.tsx |
| Next button | `data-testid="next-button"` | PlayerControls.tsx |
| Prev button | `data-testid="prev-button"` | PlayerControls.tsx |
| Track card | `data-testid="track-card"` | TrackCard.tsx |
| Playlist card | `data-testid="playlist-card"` | PlaylistCard.tsx |
| *Pre-existing:* | | |
| App sidebar | `data-testid="app-sidebar"` | Sidebar.tsx |
| Global player | `data-testid="global-player"` | GlobalPlayer.tsx |
| Audio element | `data-testid="audio-element"` | GlobalPlayer.tsx |
| Toast alert | `data-testid="toast-alert"` | Toast.tsx |