veza/tests/e2e
senke 45c130c856
Some checks failed
Veza CI / Notify on failure (push) Blocked by required conditions
Veza CI / Rust (Stream Server) (push) Successful in 5m12s
Security Scan / Secret Scanning (gitleaks) (push) Failing after 48s
Veza CI / Backend (Go) (push) Failing after 8m51s
E2E Playwright / e2e (full) (push) Has been cancelled
Veza CI / Frontend (Web) (push) Has been cancelled
feat(pwa): tighten sw.js to roadmap strategy spec + version stamper (W4 Day 16)
Service worker now applies the strategies the roadmap asks for :
  * Static assets : StaleWhileRevalidate (already in place)
  * HLS segments  : CacheFirst, max-age 7d, max 50 entries
  * API GET       : NetworkFirst, 3s timeout

Stayed on the hand-rolled fetch handlers rather than migrating to
Workbox — the existing implementation already covers push notifications
+ background sync + notificationclick, and Workbox would bring 200+ KB
of runtime + a build-step dependency for a feature set we already have.

Changes
- public/sw.js
  * HLS_CACHE_MAX_ENTRIES (50) + HLS_CACHE_MAX_AGE_MS (7d) +
    NETWORK_FIRST_TIMEOUT_MS (3s) tunable at the top of the file.
  * cacheAudio : reads the cached response's date header to skip
    stale entries (>7d), and prunes the cache FIFO after every put
    so the entry count never exceeds 50. Network-down path still
    serves stale entries (the offline-playback acceptance).
  * networkFirst : races the network against a 3s timer ; if the
    timer fires AND a cached entry exists, serve cached + let the
    network keep updating in the background. Timeout without a
    cached fallback lets the network race continue.
  * isAudioRequest now matches .ts and .m4s segments too (HLS).

- scripts/stamp-sw-version.mjs (new) : postbuild step that replaces
  the literal __BUILD_VERSION__ placeholder in dist/sw.js with
  YYYYMMDDHHMM-<short-sha>. Pre-Day 16 the placeholder shipped
  literally — same string across every deploy meant browser caches
  were never invalidated. Wired into npm run build + build:ci.

- tests/e2e/31-sw-offline-cache.spec.ts : 2 tests gated behind
  E2E_SW_TESTS=1 (SW only registers in prod builds — dev server
  skips registration via import.meta.env.DEV check). When enabled :
  (1) registration + activation, (2) cached resource served while
  context.setOffline(true).

Acceptance (Day 16) : strategies match spec ; offline playback works
once the user has played the segment once before going offline. The
e2e self-skips on dev unless E2E_SW_TESTS=1 is set against vite preview.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 09:43:09 +02:00
..
23-visual-regression.spec.ts-snapshots test: update e2e test suite and add audit tests 2026-03-23 16:06:26 +01:00
audit chore(cleanup): remove orphan code + archive disabled workflows + .playwright-mcp 2026-04-20 20:33:40 +02:00
fixtures chore(cleanup): remove orphan code + archive disabled workflows + .playwright-mcp 2026-04-20 20:33:40 +02:00
helpers chore(cleanup): remove orphan code + archive disabled workflows + .playwright-mcp 2026-04-20 20:33:40 +02:00
scripts test: add comprehensive e2e test suite (34 spec files) 2026-03-18 11:36:22 +01:00
tests/e2e/audit/results/screenshots fix(e2e): address remaining real bugs + known UX gaps 2026-04-05 16:24:11 +02:00
01-auth.spec.ts fix: sync E2E tests with seed data + i18n fix 2026-04-02 19:42:03 +02:00
02-navigation.spec.ts test(e2e): convert all remaining 298 console.log to real expect() 2026-04-08 15:50:17 +02:00
03-player.spec.ts test(e2e): skip 4 pre-existing @critical flakes with root cause + tickets — task #36 2026-04-18 03:25:11 +02:00
04-tracks.spec.ts fix(e2e): unblock @critical green slate for v1.0.9 tag (Day 4 triage) 2026-04-27 16:18:56 +02:00
05-playlists.spec.ts fix(e2e): verify playlist create via API + fix toast/dialog selectors 2026-04-05 17:52:18 +02:00
06-search-discover.spec.ts fix(e2e): address remaining real bugs + known UX gaps 2026-04-05 16:24:11 +02:00
07-social.spec.ts fix(e2e): address remaining real bugs + known UX gaps 2026-04-05 16:24:11 +02:00
08-marketplace.spec.ts fix(e2e): scope toast selector to avoid strict mode violation 2026-04-05 18:01:06 +02:00
09-chat-notifications-settings.spec.ts fix(e2e): increase expect timeout to 10s + fix selector mismatches 2026-04-04 20:26:52 +02:00
10-features.spec.ts fix(e2e): address remaining real bugs + known UX gaps 2026-04-05 16:24:11 +02:00
11-accessibility-ethics.spec.ts test(e2e): skip 14 remaining @critical baseline failures, document per root-cause — rc1-day2 finish 2026-04-18 20:05:31 +02:00
12-api.spec.ts test(e2e): convert all remaining 298 console.log to real expect() 2026-04-08 15:50:17 +02:00
13-workflows.spec.ts test(e2e): skip 14 remaining @critical baseline failures, document per root-cause — rc1-day2 finish 2026-04-18 20:05:31 +02:00
14-edge-cases.spec.ts test(e2e): convert all remaining 298 console.log to real expect() 2026-04-08 15:50:17 +02:00
15-routes-coverage.spec.ts test(e2e): convert all remaining 298 console.log to real expect() 2026-04-08 15:50:17 +02:00
16-forms-validation.spec.ts test(e2e): convert all remaining 298 console.log to real expect() 2026-04-08 15:50:17 +02:00
17-modals-dialogs.spec.ts fix(e2e): verify playlist create via API + fix toast/dialog selectors 2026-04-05 17:52:18 +02:00
18-empty-states.spec.ts fix(e2e): triage @critical batch 2 — chat WS proxy + FeedPage dette (Day 4) 2026-04-27 16:55:15 +02:00
19-responsive.spec.ts test(e2e): convert all remaining 298 console.log to real expect() 2026-04-08 15:50:17 +02:00
20-network-errors.spec.ts test(e2e): convert all remaining 298 console.log to real expect() 2026-04-08 15:50:17 +02:00
21-error-boundary.spec.ts fix: stabilize frontend — 98 TS errors to 0, align API endpoints, optimize bundle 2026-03-24 21:18:49 +01:00
22-performance.spec.ts test(e2e): convert all remaining 298 console.log to real expect() 2026-04-08 15:50:17 +02:00
23-visual-regression.spec.ts fix: stabilize frontend — 98 TS errors to 0, align API endpoints, optimize bundle 2026-03-24 21:18:49 +01:00
24-cross-browser.spec.ts test(e2e): convert all remaining 298 console.log to real expect() 2026-04-08 15:50:17 +02:00
25-profile.spec.ts test(e2e): convert all remaining 298 console.log to real expect() 2026-04-08 15:50:17 +02:00
25-register-defer-jwt.spec.ts fix(e2e): unblock @critical green slate for v1.0.9 tag (Day 4 triage) 2026-04-27 16:18:56 +02:00
26-smoke.spec.ts fix(e2e): unblock @critical green slate for v1.0.9 tag (Day 4 triage) 2026-04-27 16:18:56 +02:00
26-verify-email-header.spec.ts feat(auth): defer JWT to post-verify + verify-email header (v1.0.9 items 1.3+1.4) 2026-04-26 22:56:31 +02:00
27-chunked-upload-s3.spec.ts fix(e2e): unblock @critical green slate for v1.0.9 tag (Day 4 triage) 2026-04-27 16:18:56 +02:00
27-upload.spec.ts test(e2e): skip 14 remaining @critical baseline failures, document per root-cause — rc1-day2 finish 2026-04-18 20:05:31 +02:00
28-storybook.spec.ts fix: stabilize frontend — 98 TS errors to 0, align API endpoints, optimize bundle 2026-03-24 21:18:49 +01:00
29-chat-functional.spec.ts fix(e2e): triage @critical batch 2 — chat WS proxy + FeedPage dette (Day 4) 2026-04-27 16:55:15 +02:00
29-dmca-notice.spec.ts feat(legal): DMCA notice handler + admin queue + 451 playback gate (W3 Day 14) 2026-04-28 15:39:33 +02:00
30-embed-and-share.spec.ts feat(embed): /embed/track/:id widget + /oembed envelope + per-track OG tags (W3 Day 15) 2026-04-28 15:49:54 +02:00
30-marketplace-checkout.spec.ts test(e2e): convert all remaining 298 console.log to real expect() 2026-04-08 15:50:17 +02:00
31-auth-sessions.spec.ts test(e2e): skip 2 more baseline flakies + pre-commit Option D escalation rule 2026-04-18 20:26:30 +02:00
31-sw-offline-cache.spec.ts feat(pwa): tighten sw.js to roadmap strategy spec + version stamper (W4 Day 16) 2026-04-29 09:43:09 +02:00
32-deep-pages.spec.ts fix(e2e, ui): root causes #3 #4 #5 #6 — rc1-day2 misc baseline fixes 2026-04-18 17:22:00 +02:00
33-visual-bugs.spec.ts test(e2e): convert all remaining 298 console.log to real expect() 2026-04-08 15:50:17 +02:00
34-workflows-empty.spec.ts fix(e2e): triage @critical batch 2 — chat WS proxy + FeedPage dette (Day 4) 2026-04-27 16:55:15 +02:00
35-register.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
36-forgot-password.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
37-reset-password.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
38-user-profile.spec.ts fix: sync E2E tests with seed data + i18n fix 2026-04-02 19:42:03 +02:00
39-feed.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
40-library.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
41-chat-deep.spec.ts fix(e2e): triage @critical batch 2 — chat WS proxy + FeedPage dette (Day 4) 2026-04-27 16:55:15 +02:00
42-player-deep.spec.ts feat(e2e): add 303 deep behavioral tests + fix WebSocket + lint-staged 2026-04-06 13:35:26 +02:00
43-upload-deep.spec.ts test(e2e): skip 2 more baseline flakies + pre-commit Option D escalation rule 2026-04-18 20:26:30 +02:00
44-auth-deep.spec.ts feat(e2e): add 303 deep behavioral tests + fix WebSocket + lint-staged 2026-04-06 13:35:26 +02:00
45-playlists-deep.spec.ts test(e2e): skip 3 more @critical failures surfaced by full-suite pre-push 2026-04-18 20:12:51 +02:00
46-search-discover-deep.spec.ts feat(e2e): add 303 deep behavioral tests + fix WebSocket + lint-staged 2026-04-06 13:35:26 +02:00
47-social-deep.spec.ts feat(e2e): add 303 deep behavioral tests + fix WebSocket + lint-staged 2026-04-06 13:35:26 +02:00
48-marketplace-deep.spec.ts test(e2e): skip 3 more @critical failures surfaced by full-suite pre-push 2026-04-18 20:12:51 +02:00
49-notifications-settings-deep.spec.ts feat(e2e): add 303 deep behavioral tests + fix WebSocket + lint-staged 2026-04-06 13:35:26 +02:00
COVERAGE_MAP.md test: add comprehensive e2e test suite (34 spec files) 2026-03-18 11:36:22 +01:00
dashboard-audit.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
design-system.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
discover.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
global-setup.ts fix(e2e): hard-fail global-setup when rate limiting detected 2026-04-23 19:15:39 +02:00
global-teardown.ts test: add comprehensive e2e test suite (34 spec files) 2026-03-18 11:36:22 +01:00
helpers.ts fix(e2e): accept login-form as page readiness marker 2026-04-18 20:19:33 +02:00
launch-audit.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
login-audit.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
playlists-audit.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
playlists-detail-audit.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
playlists-edit-audit.spec.ts docs(e2e): flag test-env-assumed skips for staging verification 2026-04-19 00:37:11 +02:00
playlists-favoris-audit.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
playlists-shared-token.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
playwright.config.ts perf(ci): cut frontend unit + e2e wall time ~5-10× (vitest threads + chromium-only + browser cache) 2026-04-27 16:04:52 +02:00
queue-audit.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
search-audit.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
SKIPPED_TESTS.md docs(e2e): flag test-env-assumed skips for staging verification 2026-04-19 00:37:11 +02:00
tracks-detail-audit.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
verify-email-audit.spec.ts feat(web): update all features, stories, e2e tests, and auth interceptor 2026-03-31 19:16:36 +02:00
VEZA_AUDIT_REPORT.md test: add comprehensive e2e test suite (34 spec files) 2026-03-18 11:36:22 +01:00