brackt/app/models/__tests__
Chris Parsons eca1508b3f
Improve admin dashboard stats and fix scoring event bugs (#230)
* Improve admin dashboard stats and fix scoring event date bugs, fixes #92

- Add "Seasons by Status" breakdown card (pre-draft / drafting / active / completed)
- Replace full-table fetches with COUNT queries for sports, sports seasons, and templates
- Fix bracket events with null eventDate disappearing from the Games to Score tabs by
  computing a displayDate from matched playoffMatchGames.scheduledAt in getEventsForDates
- Fix Today tab badge showing stale count when all events are scored
- Hide "Getting Started" checklist once the system has sports configured
- Use explicit "en-US" locale in formatEventTime for deterministic output

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix scoring-event-dashboard tests after select/sql changes

- Rename mockSelectDistinct → mockSelect to match implementation change
  from .selectDistinct() to .select()
- Add sql to drizzle-orm mock
- Update mock row shapes to include eventDate and gameDate fields
- Add two tests covering displayDate derivation from eventDate and gameDate

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 20:46:54 -07:00
..
afl-finals.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
auto-pick.test.ts Fix oxlint warnings: no-shadow, consistent-function-scoping, no-non-null-assertion, and others (#196) 2026-03-21 10:59:51 -07:00
bracket-integration.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
bracket-seeding.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
bracket-templates.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
commissioner.test.ts Grant sitewide admins commissioner-level access in leagues (#162) 2026-03-18 00:41:56 -07:00
executeAutoPick.timer.test.ts Fix while_on autodraft stalling between chain bursts, fixes #190 (#222) 2026-03-24 19:09:38 -07:00
ncaa-68-bracket.test.ts Fix oxlint warnings: no-shadow, consistent-function-scoping, no-non-null-assertion, and others (#196) 2026-03-21 10:59:51 -07:00
nfl-bracket.test.ts Fix oxlint warnings: no-shadow, consistent-function-scoping, no-non-null-assertion, and others (#196) 2026-03-21 10:59:51 -07:00
participant-expected-value.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
playoff-match-game.test.ts Add playoff match game scheduling and odds management (#135) 2026-03-11 14:17:43 -07:00
playoff-match-odds.test.ts Add playoff match game scheduling and odds management (#135) 2026-03-11 14:17:43 -07:00
point-progression.test.ts feat: add recharts library and implement PointProgressionChart component for historical views 2025-11-14 21:18:34 -08:00
process-match-result.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
progressive-floor-scoring.test.ts Fix partial bracket scoring, rank labels, and Discord notification bugs (#158) 2026-03-17 12:34:10 -07:00
qualifying-points.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
regular-season-standings.test.ts Fix standings upsert no-op: use EXCLUDED pseudo-table (#215) 2026-03-23 21:22:53 -07:00
scoring-calculator-qualifying.test.ts feat: Implement Qualifying Points Standings component and related logic 2025-11-11 10:08:25 -08:00
scoring-calculator.test.ts feat: Implement bracket expansion plan to support various tournament structures 2025-11-03 09:36:16 -08:00
scoring-event-dashboard.test.ts Improve admin dashboard stats and fix scoring event bugs (#230) 2026-03-25 20:46:54 -07:00
season-standings.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
sports-season.test.ts Add isDraftable toggle to sport seasons (#165) (#178) 2026-03-18 22:40:19 -07:00
standings-snapshots.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
surface-elo.test.ts Add tennis Grand Slam simulator with surface Elo ratings, fixes #116 (#216) 2026-03-23 23:59:35 -07:00
team-projected-score.test.ts Fix participantsRemaining not counting non-scoring-round eliminations (#161) 2026-03-17 15:02:19 -07:00
tiebreaker-logic.test.ts Add oxlint linting setup with zero errors (#194) 2026-03-21 09:44:05 -07:00
upcoming-calendar.test.ts Fix oxlint errors. 2026-03-22 20:41:44 -07:00