Issue #7 follow-up: Schedule generation timing tests need investigation #33

Closed
opened 2026-05-02 00:35:54 +00:00 by david · 0 comments
Owner

Description

The core functionality for the tournament schedule feature is complete and merged. However, some acceptance tests remain @wip due to timing issues in the test harness, not the implementation.

Remaining Work

1. Schedule Generation Tests (timing issue)

Scenarios remaining @wip:

  • Tournament admin generates round-robin schedule - fails after refresh
  • Tournament admin views schedule with bye rounds - same timing issue
  • Tournament admin clicks on a matchup to enter results - matchup not found

Root Cause:
The tests use networkidle reload which triggers Next.js dev server HMR instead of fresh data fetch. In production builds, router.refresh() + revalidatePath() should resolve this.

Potential Fixes:

  1. Add explicit delay before checking rounds (e.g., waitForTimeout(2000))
  2. Use page.goto() with hard reload instead of networkidle
  3. Verify the production build behavior with npm run build && npm start

2. Bye Round Display Verification

The each team should play every other team exactly once step definition is a placeholder that just checks for schedule existence, not actual round-robin correctness.

Acceptance Criteria

  • All 4 schedule scenarios pass in CI production build
  • Bye rounds are displayed correctly for odd team counts
  • Round-robin algorithm correctness is verified programmatically
## Description The core functionality for the tournament schedule feature is complete and merged. However, some acceptance tests remain @wip due to timing issues in the test harness, not the implementation. ## Remaining Work ### 1. Schedule Generation Tests (timing issue) **Scenarios remaining @wip:** - `Tournament admin generates round-robin schedule` - fails after refresh - `Tournament admin views schedule with bye rounds` - same timing issue - `Tournament admin clicks on a matchup to enter results` - matchup not found **Root Cause:** The tests use `networkidle` reload which triggers Next.js dev server HMR instead of fresh data fetch. In production builds, `router.refresh()` + `revalidatePath()` should resolve this. **Potential Fixes:** 1. Add explicit delay before checking rounds (e.g., `waitForTimeout(2000)`) 2. Use `page.goto()` with hard reload instead of `networkidle` 3. Verify the production build behavior with `npm run build && npm start` ### 2. Bye Round Display Verification The `each team should play every other team exactly once` step definition is a placeholder that just checks for schedule existence, not actual round-robin correctness. ## Acceptance Criteria - [ ] All 4 schedule scenarios pass in CI production build - [ ] Bye rounds are displayed correctly for odd team counts - [ ] Round-robin algorithm correctness is verified programmatically
david closed this issue 2026-05-02 11:14:47 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: david/euchre_camp#33