1.4 KiB
1.4 KiB
Issue #180 Evidence — SPA next-round + final leaderboard
Flow log (Angular SPA)
- Host reaches
revealphase and runsloadScoreboard()(GET /lobby/sessions/:code/scoreboard). - Host can start next round directly in SPA via
startNextRound()(POST /lobby/sessions/:code/rounds/next) and then session hydrate (GET /lobby/sessions/:code) without page reload. - Host can finish game directly in SPA via
finishGame()(POST /lobby/sessions/:code/finish), rendering final leaderboard payload in the same shell. - Player SPA renders final leaderboard from refreshed finished-session payload (sorted by score desc, nickname tiebreak) without leaving SPA route.
- Error/retry paths are implemented and covered:
- scoreboard failure ->
scoreboardError+ retry button - next-round failure ->
nextRoundError+ retry button - finish-game/final-leaderboard failure ->
finishError+ retry button
- scoreboard failure ->
Test evidence
frontend/angular (Vitest)
src/app/features/host/host-shell.component.spec.tsruns next-round transition without reload and clears scoreboard payloadcaptures finish-game failure for retry and stores final leaderboard on success
src/app/features/player/player-shell.component.spec.tsbuilds final leaderboard in finished status without legacy page hop
Result:
- Test Files: 2 passed
- Tests: 9 passed
frontend shared SPA tests (regression)
Result:
- Test Files: 5 passed
- Tests: 24 passed