brackt/app/routes/api/__tests__
Chris Parsons 789408e428
Fix chess clock increment not applied to all pick types (#67 regression) (#220)
Fixes #220

When standard draft mode was added, the chess clock increment was
accidentally restricted to owner-only picks. Commissioner, admin, and
auto-picks stopped earning the increment, causing teams that timed out
to freeze at 0s and instant-autopick every subsequent round.

Fix:
- make-pick: all pick types earn the increment in chess clock mode
- force-manual-pick: same; deduplicate standard/chess-clock branches
  into a single update with mode-selected SQL; remove now-unused
  timerSnapshot query
- draft-utils executeAutoPick: restore increment for chess clock
  auto-picks; add missing seed insert when no timer row exists
- server/timer.ts: fix fallback initialization to use draftIncrementTime
  in standard mode (was always using draftInitialTime)
- leagues/$leagueId.tsx: show Draft Timer Mode in League Info panel

Tests:
- Update draft.make-pick.timer-mode to cover owner/commissioner/admin
  in both modes (commissioner section previously asserted frozen bank)
- Add draft.force-manual-pick.timer-mode for commissioner/admin force
  picks in both modes
- Add executeAutoPick.timer for timer-triggered auto-picks in both modes
- Update draft.force-manual-pick to reflect new chess clock behavior
- Replace fragile toHaveBeenCalledTimes(2) assertions with
  toHaveBeenCalledWith checks on the timer set call

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 17:00:32 -07:00
..
draft.force-manual-pick.test.ts Fix chess clock increment not applied to all pick types (#67 regression) (#220) 2026-03-24 17:00:32 -07:00
draft.force-manual-pick.timer-mode.test.ts Fix chess clock increment not applied to all pick types (#67 regression) (#220) 2026-03-24 17:00:32 -07:00
draft.make-pick.timer-mode.test.ts Fix chess clock increment not applied to all pick types (#67 regression) (#220) 2026-03-24 17:00:32 -07:00
draft.start.test.ts Add standard draft clock mode (#67) (#189) 2026-03-20 21:36:39 -07:00
queue.add.test.ts feat: Implement drag-and-drop functionality for queue items; add duplicate prevention for participants in queue 2025-10-25 21:02:16 -07:00