# User Stories to Acceptance Tests Mapping ## Epic 1: Authentication & User Management | User Story | Acceptance Criteria | Test File | Status | |------------|---------------------|-----------|--------| | As a new user, I want to register for an account | Registration form, email validation, password requirements, email confirmation, auto-create player profile | `account-acceptance.test.ts` (partially) | ⚠️ Partial | | As a registered user, I want to log in to my account | Login form, session management, remember me, error handling, account lockout | `account-acceptance.test.ts` | ✅ Covered | | As a logged-in user, I want to log out | Logout button, session cleared, redirect to home | `Navigation.test.tsx` (partial) | ⚠️ Partial | | As a user who forgot my password, I want to reset it | Forgot password link, email input, token generation, reset email, password update form | - | ❌ Missing | ## Epic 2: Player Profile & Analytics | User Story | Acceptance Criteria | Test File | Status | |------------|---------------------|-----------|--------| | As a player, I want to view my profile | Profile header, Elo rating, games played, win rate, member since | - | ❌ Missing | | As a player, I want to see my partnership performance | Partnership table, games with partner, win rate, Elo change, last played | - | ❌ Missing | | As a player, I want to see my recent games | Timeline of matches, date/opponents/scores, partner info, pagination | - | ❌ Missing | | As a player, I want to see my tournament history | Tournament list, final standings, performance summary | - | ❌ Missing | ## Epic 3: Rankings & Public Data | User Story | Acceptance Criteria | Test File | Status | |------------|---------------------|-----------|--------| | As a visitor, I want to view player rankings | Sortable table, columns, search/filter, pagination | - | ❌ Missing | | As a visitor, I want to view player profiles | Public profile pages, basic stats, partnership performance, recent games | - | ❌ Missing | ## Epic 4: Tournament Management | User Story | Acceptance Criteria | Test File | Status | |------------|---------------------|-----------|--------| | As a tournament admin, I want to create a new tournament | Tournament creation form, format selection, validation | `EditTournamentForm.test.tsx` (partial) | ⚠️ Partial | | As a tournament admin, I want to manage tournament participants | Add/remove participants, bulk import, participant list | - | ❌ Missing | | As a tournament admin, I want to create teams | Team creation form, select two players, auto-generate names, edit/delete | - | ❌ Missing | | As a tournament admin, I want to generate a schedule | Round-robin, elimination brackets, view by round, re-schedule | - | ❌ Missing | | As a tournament admin, I want to record match results | Match entry form, select teams, enter scores, auto-determine winner | - | ❌ Missing | | As a tournament admin, I want to upload results via CSV | CSV upload, parse format, validate players, create teams, import matches | - | ❌ Missing | | As a tournament admin, I want to view tournament analytics | Tournament stats, partnership performance, Elo changes, charts | - | ❌ Missing | ## Epic 5: Match Recording & CSV Import | User Story | Acceptance Criteria | Test File | Status | |------------|---------------------|-----------|--------| | As a user, I want to record a match result | Match creation form, select teams, enter scores, auto-calculate winner, update Elo, update partnerships | - | ❌ Missing | | As a user, I want to upload match results via CSV | CSV upload, Euchre format support, table mapping, player name variations, import summary | - | ❌ Missing | | As a user, I want to edit match results | Edit form, time limit validation, update Elo, log changes | - | ❌ Missing | ## Epic 6: Club Administration | User Story | Acceptance Criteria | Test File | Status | |------------|---------------------|-----------|--------| | As a club admin, I want to manage all players | Player directory, create/edit/delete, bulk actions, view activity | - | ❌ Missing | | As a club admin, I want to manage all tournaments | Tournament list, clone, archive, analytics | - | ❌ Missing | | As a club admin, I want to configure club settings | Elo parameters, partnership preferences, notifications, default settings | - | ❌ Missing | | As a club admin, I want to view club analytics | Rating distribution, activity heatmaps, partnership network, export reports | - | ❌ Missing | ## Epic 7: Mobile Responsiveness | User Story | Acceptance Criteria | Test File | Status | |------------|---------------------|-----------|--------| | As a mobile user, I want to navigate the site | Responsive navigation, bottom nav, touch-friendly, small screen layouts | - | ❌ Missing | | As a mobile user, I want to record match results | Mobile-optimized forms, quick entry, offline support | - | ❌ Missing | ## Epic 8: Data Management & Export | User Story | Acceptance Criteria | Test File | Status | |------------|---------------------|-----------|--------| | As a club admin, I want to export data | Export players, tournaments, matches, partnership data to CSV | - | ❌ Missing | | As a club admin, I want to import data | Import players, tournaments, matches, validation, error reporting | - | ❌ Missing | ## Summary - **Total User Stories:** 32 - **Fully Covered:** 1 (Epic 1 - Login) - **Partially Covered:** 3 (Epic 1 - Registration, Logout; Epic 4 - Tournament creation) - **Missing:** 28 ## Recommended Test Files to Create ### Epic 1: Authentication - `auth-registration.test.ts` - Registration flow - `auth-logout.test.ts` - Logout functionality - `auth-password-reset.test.ts` - Password reset flow ### Epic 2: Player Profile - `player-profile.test.ts` - Profile viewing - `player-partnerships.test.ts` - Partnership analytics - `player-games.test.ts` - Recent games timeline - `player-tournaments.test.ts` - Tournament history ### Epic 3: Rankings - `rankings.test.ts` - Rankings page - `public-profiles.test.ts` - Public player profiles ### Epic 4: Tournament Management - `tournament-creation.test.ts` - Create tournament - `tournament-participants.test.ts` - Manage participants - `tournament-teams.test.ts` - Team management - `tournament-schedule.test.ts` - Schedule generation - `tournament-results.test.ts` - Record match results - `tournament-csv-upload.test.ts` - CSV upload - `tournament-analytics.test.ts` - Tournament analytics ### Epic 5: Match Recording - `match-recording.test.ts` - Record match results - `match-csv-import.test.ts` - CSV import - `match-editing.test.ts` - Edit match results ### Epic 6: Club Administration - `admin-players.test.ts` - Player management - `admin-tournaments.test.ts` - Tournament management - `admin-settings.test.ts` - Club settings - `admin-analytics.test.ts` - Club analytics ### Epic 7: Mobile Responsiveness - `mobile-navigation.test.ts` - Mobile navigation - `mobile-forms.test.ts` - Mobile form entry ### Epic 8: Data Management - `data-export.test.ts` - Export functionality - `data-import.test.ts` - Import functionality