feat: add player schedule feature test (issue #9)

- Add player-schedule.feature with 3 scenarios
- Add step definitions for schedule navigation
- Tests empty schedule, upcoming matches, and match details navigation
- Note: Some @wip scenarios require data setup (tournament, participants)
This commit is contained in:
2026-04-25 21:14:48 -07:00
parent 58857af5ca
commit b96932270b
2 changed files with 53 additions and 0 deletions
@@ -262,3 +262,28 @@ Then('my user account should exist', async function () {
await expect(world.page.locator('text=Welcome')).toBeVisible();
console.log('🌍 Verified user account was created successfully');
});
/**
* Schedule steps
*/
When('I go to my schedule page', async function () {
console.log('🌍 Going to schedule page');
// Navigate to the schedule page
// The URL pattern would be /players/{playerId}/schedule
// We'll navigate to /players/schedule which should redirect or work
await world.page.goto(`${world.baseURL}/players/schedule`);
await world.page.waitForLoadState('networkidle');
});
Given('I have upcoming matches in my schedule', async function () {
console.log('🌍 Note: This step requires database setup via API or UI');
console.log('🌍 For acceptance tests, this would be set up before running the test');
// For true acceptance testing, we would:
// 1. Create a tournament
// 2. Add the player as a participant
// 3. Generate a schedule
// 4. The match would then appear in the player's schedule
// For now, this is a placeholder that indicates data setup is needed
// In a real test run, this data would already exist in the dev database
});