b2498decf8
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
50 lines
2.0 KiB
Gherkin
50 lines
2.0 KiB
Gherkin
Feature: Tournament Schedule
|
|
As a tournament admin
|
|
I want to view and generate round matchups in a Schedule tab
|
|
So that I can manage tournament matches
|
|
|
|
@happy-path @tournament @issue-7
|
|
Scenario: Tournament admin views schedule page for tournament
|
|
Given I am logged in as a tournament admin
|
|
And a tournament exists with 4 teams
|
|
When I go to the tournament schedule page
|
|
Then I should see "Schedule"
|
|
And I should see the "Generate Schedule" button
|
|
|
|
@happy-path @tournament @issue-7
|
|
Scenario: Tournament admin generates round-robin schedule
|
|
Given I am logged in as a tournament admin
|
|
And a tournament exists with 4 teams
|
|
When I go to the tournament schedule page
|
|
And I click the "Generate Schedule" button
|
|
Then I should see "Generated"
|
|
And I should see "rounds with"
|
|
# Navigate away and back to verify schedule persisted (avoids HMR caching issues)
|
|
When I go to the tournament schedule page
|
|
Then I should see round 1 matchups
|
|
And I should see round 2 matchups
|
|
|
|
@happy-path @tournament @issue-7
|
|
Scenario: Tournament admin views schedule with bye rounds
|
|
Given I am logged in as a tournament admin
|
|
And a tournament exists with 5 teams
|
|
When I go to the tournament schedule page
|
|
And I click the "Generate Schedule" button
|
|
Then I should see "Generated"
|
|
# Navigate away and back to verify schedule persisted
|
|
When I go to the tournament schedule page
|
|
Then I should see 5 rounds
|
|
And each team should play every other team exactly once
|
|
|
|
@happy-path @tournament @issue-7
|
|
Scenario: Tournament admin clicks on a matchup to enter results
|
|
Given I am logged in as a tournament admin
|
|
And a tournament exists with 4 teams
|
|
When I go to the tournament schedule page
|
|
And I click the "Generate Schedule" button
|
|
Then I should see "Generated"
|
|
# Navigate away and back to ensure schedule data is loaded
|
|
When I go to the tournament schedule page
|
|
And I click on a matchup
|
|
Then I should be on the match result entry page
|