9353ab1edc
Progress on issue #7 - tournament schedule e2e tests: - Created ScheduleDisplay component with clickthrough to matches - Updated ScheduleGenerator to use router.refresh() instead of window.location.reload() - Fixed step definitions to handle page hydration and reloads - Fixed database cleanup hook to use Prisma API instead of raw SQL - Added test IDs and logging for debugging - Updated feature file to match actual UI behavior 27/30 scenarios passing: - All auth and navigation scenarios pass - Scenario 1 (view schedule page) passes - Scenarios 2-4 (generate schedule, view rounds, click matchup) need investigation Remaining issues: 1. Page refresh not picking up newly generated schedule data 2. Round data not visible after 'Generated' message 3. Matchup elements not found after refresh 4. Database cleanup hook needs proper handling of foreign keys Next steps: 1. Investigate why router.refresh() and explicit reload don't show new data 2. Check if there's a caching issue in the production build 3. Verify database transactions are committing correctly 4. Add more logging to trace data flow
47 lines
1.7 KiB
Gherkin
47 lines
1.7 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"
|
|
When I refresh the 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"
|
|
When I refresh the 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"
|
|
When I refresh the page
|
|
And I click on a matchup
|
|
Then I should be on the match result entry page
|