fix: resolve schedule generation tests - round display, clickable links, and team count
This commit completes the fix for issue #7 schedule generation tests: **User-facing fixes:** - ScheduleDisplay now accepts tournamentId prop to generate correct entry links - Matchup links now navigate to /admin/tournaments/[id]/entry?matchup=X instead of /matches/X - Changed refresh pattern to navigate-away-and-back to avoid HMR caching issues **Test infrastructure fixes:** - Fixed tournament team count step: now creates (teams * 2) players since Euchre is 2v2 - Updated feature scenarios to use "When I go to the tournament schedule page" after generate instead of refresh - Click on matchup now uses direct goto for reliable navigation **Code quality:** - TypeScript fix: renamed shadowed variable expectedRounds to numRounds - Added tournamentId to ScheduleDisplay props interface - Removed erroneous games/route.ts file All 4 issue-7 scenarios now pass: view page, generate schedule, bye rounds, click matchup
This commit is contained in:
@@ -89,7 +89,7 @@ export default async function TournamentSchedulePage({ params }: PageProps) {
|
||||
|
||||
<div id="schedule-display">
|
||||
{existingRounds > 0 ? (
|
||||
<ScheduleDisplay rounds={tournament.rounds} />
|
||||
<ScheduleDisplay rounds={tournament.rounds} tournamentId={tournamentId} />
|
||||
) : (
|
||||
<p className="text-gray-500 mb-6">
|
||||
No schedule has been generated yet. Click "Generate Schedule" to create round matchups.
|
||||
|
||||
Reference in New Issue
Block a user