Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add end-to-end tests for the service worker update and the pack-changed replay dialog

Đang mở
#30 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
58/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
playwright, typescript
Lĩnh vực
backend, testing

Hướng nghiên cứu

Read the PWA design in docs/adr/0006-offline-first-pwa-on-github-pages.md, then inspect apps/web/e2e/play.spec.ts and the referenced service worker, PWA service, and game screen files. First check how the existing CI e2e job runs Playwright and how it serves builds or intercepts routes. Done means both flows pass in that job, covering the update toast, reload and cache cleanup, plus full and partial replay results.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area: web priority: medium type: chore

Context

A broken service worker can pin players to a broken version (ADR 0006). The update toast has no automated test, and the dialog that replays a save against a changed pack is only unit-tested.

Scope

  • Update flow: serve build A, visit it, then serve build B with a different content hash. Expect the "New version available" toast, no change before the player reloads, build B after reload, and old caches deleted.
  • Replay flow: autosave in a pack, then load it with a changed version of the pack. One case where every move replays, one where a move is rejected; expect the dialog and the "n of m moves replayed" result.
  • Fixtures: two builds, or route interception that serves a modified sw.js and pack.

Acceptance criteria

  • The update test covers toast, reload and cache cleanup.
  • The replay test covers full and partial replay.
  • Both tests run in the CI e2e job.

References

  • apps/web/src/sw.ts
  • apps/web/src/services/pwa.ts
  • apps/web/src/screens/game.ts
  • apps/web/e2e/play.spec.ts
  • docs/adr/0006-offline-first-pwa-on-github-pages.md
Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Merge trung bình
28 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nullthrone/lexvm

Tất cả issue của nullthrone/lexvm

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.