From 20a16f7cbeb1a2c3e14a45c5b6c4e231876e6219 Mon Sep 17 00:00:00 2001 From: senke Date: Wed, 18 Mar 2026 11:36:22 +0100 Subject: [PATCH] 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) --- tests/e2e/01-auth.spec.ts | 280 ++++++ tests/e2e/02-navigation.spec.ts | 237 ++++++ tests/e2e/03-player.spec.ts | 503 +++++++++++ tests/e2e/04-tracks.spec.ts | 333 ++++++++ tests/e2e/05-playlists.spec.ts | 226 +++++ tests/e2e/06-search-discover.spec.ts | 276 ++++++ tests/e2e/07-social.spec.ts | 146 ++++ tests/e2e/08-marketplace.spec.ts | 204 +++++ .../09-chat-notifications-settings.spec.ts | 357 ++++++++ tests/e2e/10-features.spec.ts | 272 ++++++ tests/e2e/11-accessibility-ethics.spec.ts | 378 +++++++++ tests/e2e/12-api.spec.ts | 221 +++++ tests/e2e/13-workflows.spec.ts | 479 +++++++++++ tests/e2e/14-edge-cases.spec.ts | 567 +++++++++++++ tests/e2e/15-routes-coverage.spec.ts | 362 ++++++++ tests/e2e/16-forms-validation.spec.ts | 797 ++++++++++++++++++ tests/e2e/17-modals-dialogs.spec.ts | 609 +++++++++++++ tests/e2e/18-empty-states.spec.ts | 298 +++++++ tests/e2e/19-responsive.spec.ts | 390 +++++++++ tests/e2e/20-network-errors.spec.ts | 364 ++++++++ tests/e2e/21-error-boundary.spec.ts | 319 +++++++ tests/e2e/22-performance.spec.ts | 641 ++++++++++++++ tests/e2e/23-visual-regression.spec.ts | 312 +++++++ .../404-page-chromium-linux.png | Bin 0 -> 480458 bytes .../library-page-chromium-linux.png | Bin 0 -> 514439 bytes .../playlists-page-chromium-linux.png | Bin 0 -> 519443 bytes .../profile-page-chromium-linux.png | Bin 0 -> 620259 bytes .../register-page-chromium-linux.png | Bin 0 -> 618606 bytes .../tracks-list-page-chromium-linux.png | Bin 0 -> 483759 bytes tests/e2e/24-cross-browser.spec.ts | 402 +++++++++ tests/e2e/25-profile.spec.ts | 597 +++++++++++++ tests/e2e/26-smoke.spec.ts | 195 +++++ tests/e2e/27-upload.spec.ts | 217 +++++ tests/e2e/28-storybook.spec.ts | 99 +++ tests/e2e/29-chat-functional.spec.ts | 188 +++++ tests/e2e/30-marketplace-checkout.spec.ts | 213 +++++ tests/e2e/31-auth-sessions.spec.ts | 126 +++ tests/e2e/32-deep-pages.spec.ts | 449 ++++++++++ tests/e2e/33-visual-bugs.spec.ts | 197 +++++ tests/e2e/34-workflows-empty.spec.ts | 245 ++++++ tests/e2e/COVERAGE_MAP.md | 370 ++++++++ tests/e2e/VEZA_AUDIT_REPORT.md | 66 ++ tests/e2e/fixtures/file-helpers.ts | 112 +++ tests/e2e/global-setup.ts | 83 ++ tests/e2e/global-teardown.ts | 6 + tests/e2e/helpers.ts | 446 ++++++++++ tests/e2e/playwright.config.ts | 137 +++ tests/e2e/scripts/generate-audit-report.mjs | 774 +++++++++++++++++ 48 files changed, 13493 insertions(+) create mode 100644 tests/e2e/01-auth.spec.ts create mode 100644 tests/e2e/02-navigation.spec.ts create mode 100644 tests/e2e/03-player.spec.ts create mode 100644 tests/e2e/04-tracks.spec.ts create mode 100644 tests/e2e/05-playlists.spec.ts create mode 100644 tests/e2e/06-search-discover.spec.ts create mode 100644 tests/e2e/07-social.spec.ts create mode 100644 tests/e2e/08-marketplace.spec.ts create mode 100644 tests/e2e/09-chat-notifications-settings.spec.ts create mode 100644 tests/e2e/10-features.spec.ts create mode 100644 tests/e2e/11-accessibility-ethics.spec.ts create mode 100644 tests/e2e/12-api.spec.ts create mode 100644 tests/e2e/13-workflows.spec.ts create mode 100644 tests/e2e/14-edge-cases.spec.ts create mode 100644 tests/e2e/15-routes-coverage.spec.ts create mode 100644 tests/e2e/16-forms-validation.spec.ts create mode 100644 tests/e2e/17-modals-dialogs.spec.ts create mode 100644 tests/e2e/18-empty-states.spec.ts create mode 100644 tests/e2e/19-responsive.spec.ts create mode 100644 tests/e2e/20-network-errors.spec.ts create mode 100644 tests/e2e/21-error-boundary.spec.ts create mode 100644 tests/e2e/22-performance.spec.ts create mode 100644 tests/e2e/23-visual-regression.spec.ts create mode 100644 tests/e2e/23-visual-regression.spec.ts-snapshots/404-page-chromium-linux.png create mode 100644 tests/e2e/23-visual-regression.spec.ts-snapshots/library-page-chromium-linux.png create mode 100644 tests/e2e/23-visual-regression.spec.ts-snapshots/playlists-page-chromium-linux.png create mode 100644 tests/e2e/23-visual-regression.spec.ts-snapshots/profile-page-chromium-linux.png create mode 100644 tests/e2e/23-visual-regression.spec.ts-snapshots/register-page-chromium-linux.png create mode 100644 tests/e2e/23-visual-regression.spec.ts-snapshots/tracks-list-page-chromium-linux.png create mode 100644 tests/e2e/24-cross-browser.spec.ts create mode 100644 tests/e2e/25-profile.spec.ts create mode 100644 tests/e2e/26-smoke.spec.ts create mode 100644 tests/e2e/27-upload.spec.ts create mode 100644 tests/e2e/28-storybook.spec.ts create mode 100644 tests/e2e/29-chat-functional.spec.ts create mode 100644 tests/e2e/30-marketplace-checkout.spec.ts create mode 100644 tests/e2e/31-auth-sessions.spec.ts create mode 100644 tests/e2e/32-deep-pages.spec.ts create mode 100644 tests/e2e/33-visual-bugs.spec.ts create mode 100644 tests/e2e/34-workflows-empty.spec.ts create mode 100644 tests/e2e/COVERAGE_MAP.md create mode 100644 tests/e2e/VEZA_AUDIT_REPORT.md create mode 100644 tests/e2e/fixtures/file-helpers.ts create mode 100644 tests/e2e/global-setup.ts create mode 100644 tests/e2e/global-teardown.ts create mode 100644 tests/e2e/helpers.ts create mode 100644 tests/e2e/playwright.config.ts create mode 100644 tests/e2e/scripts/generate-audit-report.mjs diff --git a/tests/e2e/01-auth.spec.ts b/tests/e2e/01-auth.spec.ts new file mode 100644 index 000000000..2007fdba7 --- /dev/null +++ b/tests/e2e/01-auth.spec.ts @@ -0,0 +1,280 @@ +import { test, expect } from '@playwright/test'; +import { CONFIG, loginViaUI, navigateTo, assertNoDebugText } from './helpers'; + +test.describe('AUTH — Inscription', () => { + test('01. La page /register se charge correctement', async ({ page }) => { + await navigateTo(page, '/register'); + await expect(page.getByTestId('register-form')).toBeVisible({ timeout: 10_000 }); + await expect(page.locator('#register-username')).toBeVisible({ timeout: 5_000 }); + await expect(page.locator('#register-email')).toBeVisible({ timeout: 5_000 }); + await expect(page.locator('#register-password')).toBeVisible({ timeout: 5_000 }); + await assertNoDebugText(page); + }); + + test('02. Inscription avec email + mot de passe valides', async ({ page }) => { + await navigateTo(page, '/register'); + await page.getByTestId('register-form').waitFor({ state: 'visible', timeout: 10_000 }); + + const uniqueSuffix = Date.now(); + const uniqueEmail = `e2e-${uniqueSuffix}@veza.test`; + + const usernameInput = page.locator('#register-username'); + await usernameInput.waitFor({ state: 'visible', timeout: 5_000 }); + await usernameInput.fill(`e2e-user-${uniqueSuffix}`); + await page.locator('#register-email').fill(uniqueEmail); + await page.locator('#register-password').fill('SecurePass123!@#'); + await page.locator('#register-password_confirm').fill('SecurePass123!@#'); + + // Accept terms — Radix Checkbox renders a visible + + +
+
+

VEZA — Rapport d'Audit E2E

+
${esc(dateStr)} · ${fmtDuration(totalMs)}
+
+
+
${passRate}%
+
+
+
+
${passed.length}
Passes
+
${failed.length}
Echoues
+
${flaky.length}
Flaky
+
${skipped.length}
Ignores
+
+
+ +
+ + + + + +
+ + +
+ + + + + + + + ${failed.length > 0 ? `` : ''} + ${failed.length > 0 ? `` : ''} +
+ + +

Resume par domaine

+ + + ${domainRows} +
DomaineProgressionTestsStatus
+ + +

✅ Ce qui fonctionne

+

❌ Ce qui ne fonctionne pas

+ + ${domainSections} + + +

⚠️ Points d'attention

+

Elements non testables automatiquement

+
    +
  • Qualite audio reelle (transcodage, HLS adaptatif)
  • +
  • Integrations tierces en production (Stripe reel, OAuth providers reels)
  • +
  • Performance sous charge (utiliser k6 ou Artillery)
  • +
  • Emails transactionnels (verification, reset password)
  • +
  • WebSocket temps reel multi-clients
  • +
  • Rendu audio/video reel dans le navigateur headless
  • +
+ ${flakyHtml} + + +

📋 Plan de correction

+ ${planHtml || '

Aucun test en echec — rien a corriger.

'} + + + + +
+
+ + + + + + +`; + +// ═══════════════════════════════════════════════════════════════════════════ +// 7. WRITE OUTPUTS +// ═══════════════════════════════════════════════════════════════════════════ + +const htmlPath = resolve(ROOT, 'VEZA_AUDIT_REPORT.html'); +writeFileSync(htmlPath, html, 'utf-8'); + +// JSON output +const jsonData = { + generated: now.toISOString(), + durationMs: totalMs, + total, passed: passed.length, failed: failed.length, skipped: skipped.length, flaky: flaky.length, + passRate, + domains: orderedDomains.filter(d => byDomain[d]).map(d => { + const data = byDomain[d]; + return { + name: d, + passed: data.passed.length, + failed: data.failed.length, + skipped: data.skipped.length, + flaky: data.flaky.length, + failedTests: data.failed.map(t => ({ title: t.title, file: t.file, error: t.errorSnippet, severity: severity(t), impact: impact(t) })), + }; + }), + allFailed: failed.map(t => ({ title: t.title, file: t.file, error: t.errorSnippet, severity: severity(t), impact: impact(t), tags: t.tags })), +}; +const jsonPath = resolve(ROOT, 'VEZA_AUDIT_REPORT.json'); +writeFileSync(jsonPath, JSON.stringify(jsonData, null, 2), 'utf-8'); + +console.log(`\n${'═'.repeat(55)}`); +console.log(` VEZA E2E AUDIT: ${passed.length}/${total} (${passRate}%) — ${failed.length} echec(s)`); +console.log(`${'═'.repeat(55)}`); +console.log(` ✅ HTML : ${htmlPath}`); +console.log(` 📊 JSON : ${jsonPath}`); +console.log(`${'═'.repeat(55)}\n`); + +if (failed.length > 0) process.exit(1); + +// ═══════════════════════════════════════════════════════════════════════════ +// Placeholder when no results +// ═══════════════════════════════════════════════════════════════════════════ +function writePlaceholder() { + const ph = `VEZA Audit + +

VEZA — Rapport d'Audit E2E

Aucun resultat de test trouve.

+

Lancez : npm run e2e:audit

`; + writeFileSync(resolve(ROOT, 'VEZA_AUDIT_REPORT.html'), ph, 'utf-8'); + console.log(`📄 Placeholder written to tests/e2e/VEZA_AUDIT_REPORT.html`); +}