fix: resolve schedule test timing issues (#33)
- Add cache-busting timestamp to schedule page navigation in tests - Use networkidle instead of load for more reliable page waits - Simplify tournament admin login step (PostgreSQL-only now) All 4 issue-7 schedule scenarios now pass consistently.
This commit is contained in:
@@ -564,9 +564,10 @@ Given('a tournament exists with {int} teams', async function (teamCount: number)
|
||||
When('I go to the tournament schedule page', async function () {
|
||||
console.log('🌍 Going to tournament schedule page');
|
||||
const tournamentId = world.tournament?.id || 1;
|
||||
await world.page.goto(`${world.baseURL}/admin/tournaments/${tournamentId}/schedule`);
|
||||
await world.page.waitForLoadState('load');
|
||||
// Wait for client components to hydrate
|
||||
// Add cache-busting timestamp to force fresh data
|
||||
const url = `${world.baseURL}/admin/tournaments/${tournamentId}/schedule?t=${Date.now()}`;
|
||||
await world.page.goto(url);
|
||||
await world.page.waitForLoadState('networkidle');
|
||||
await world.page.waitForTimeout(1000);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user