v1.7.0: multiplayer test coverage — player-scoped fixtures + N-player clock verification (ISS-116, ISS-113) #161

Merged
kamilkrzywda merged 1 commits from feat/multiplayer-test-coverage into master 2026-09-26 22:40:03 +02:00
Owner

Multiplayer step 12/12. Tests only — no production game code changed.

  • e2e/multiplayer.spec.ts (new, serial): two live sessions. Test 1 = N-player clock (#135 × ISS-113): A flying + B grounded → world clock advances on every read; all players grounded → frozen exactly. Test 2 = ownership isolation: shared fleet with ownerId/ownerName in both views, 403 not-your-plane for fly+sell across owners (beats the last-plane 409), per-session account rows (grant to local moves only A), players summary visible to both.
  • e2e/auth.ts: mintPlayerSession forwards an optional username (route supported it since v1.1.0).
  • app/api/test/delete-plane/route.ts (new, FLIGHT_TEST_HOOKS-gated): deletes a player's planes — B's onboarding starter is unsellable (per-owner last-plane guard) and would break later specs' single-fleet self-heal; afterAll cleans up even on failure.
  • lib/sim/engine.test.ts: tickOnce-level N-player clock test + symmetric spawn-quality MAX case (local leads).

Local verification: tsc --noEmit clean, vitest 445/445, playwright --list 66 tests in 18 files.

Multiplayer step 12/12. Tests only — no production game code changed. - e2e/multiplayer.spec.ts (new, serial): two live sessions. Test 1 = N-player clock (#135 × ISS-113): A flying + B grounded → world clock advances on every read; all players grounded → frozen exactly. Test 2 = ownership isolation: shared fleet with ownerId/ownerName in both views, 403 not-your-plane for fly+sell across owners (beats the last-plane 409), per-session account rows (grant to local moves only A), players summary visible to both. - e2e/auth.ts: mintPlayerSession forwards an optional username (route supported it since v1.1.0). - app/api/test/delete-plane/route.ts (new, FLIGHT_TEST_HOOKS-gated): deletes a player's planes — B's onboarding starter is unsellable (per-owner last-plane guard) and would break later specs' single-fleet self-heal; afterAll cleans up even on failure. - lib/sim/engine.test.ts: tickOnce-level N-player clock test + symmetric spawn-quality MAX case (local leads). Local verification: tsc --noEmit clean, vitest 445/445, playwright --list 66 tests in 18 files.
kamilkrzywda added 1 commit 2026-09-26 22:26:28 +02:00
kamilkrzywda scheduled this pull request to auto merge when all checks succeed 2026-09-26 22:29:22 +02:00
kamilkrzywda merged commit b60006a949 into master 2026-09-26 22:40:03 +02:00
kamilkrzywda deleted branch feat/multiplayer-test-coverage 2026-09-26 22:40:03 +02:00
Sign in to join this conversation.