# Quick Test Guide - Account/Character System **Test this NOW to verify everything works!** --- ## ๐Ÿงช Test 1: New User Registration **Steps:** 1. Open https://echoesoftheashgame.patacuack.net 2. Should redirect to login page 3. Click "Don't have an account? Register" 4. Enter email: `test@example.com` 5. Enter password: `test123` 6. Click "Register" **Expected:** - โœ… Redirects to character selection screen - โœ… Shows "You don't have any characters yet" - โœ… Shows "Create New Character" card - โœ… Shows "0 / 1 slots used" (free account) --- ## ๐Ÿงช Test 2: Character Creation **Steps:** 1. From character selection, click "Create New Character" card 2. Enter name: `TestHero` 3. Allocate stats: - Strength: 8 - Agility: 5 - Endurance: 4 - Intellect: 3 4. Check "Points Remaining" shows 0 5. Check HP preview shows 140 (100 + 4*10) 6. Check Stamina preview shows 120 (100 + 4*5) 7. Click "Create Character" **Expected:** - โœ… Redirects back to character selection - โœ… Shows new character card with: - Name: TestHero - Level 1 - HP: 140/140 - Correct stat emojis (๐Ÿ’ช8 โšก5 ๐Ÿ›ก๏ธ4 ๐Ÿง 3) - โœ… Shows "1 / 1 slots used" - โœ… "Create New Character" card is GONE (at limit) - โœ… Shows premium upgrade banner --- ## ๐Ÿงช Test 3: Character Selection & Game Entry **Steps:** 1. From character selection, click "Play" on TestHero 2. Wait for redirect **Expected:** - โœ… Redirects to game screen - โœ… Game header shows "TestHero" in top right - โœ… Game loads normally - โœ… Can interact with game --- ## ๐Ÿงช Test 4: Character Limit (Free Account) **Steps:** 1. From game, click "TestHero" in header 2. Should redirect to character selection 3. Try to click "Create New Character" **Expected:** - โœ… "Create New Character" card is NOT visible - โœ… Premium banner shows: "Character Limit Reached" - โœ… Banner shows: "Upgrade to Premium to create up to 10 characters!" --- ## ๐Ÿงช Test 5: Logout and Re-Login **Steps:** 1. From character selection, click "Logout" 2. Should redirect to login screen 3. Enter same email: `test@example.com` 4. Enter password: `test123` 5. Click "Login" **Expected:** - โœ… Redirects to character selection - โœ… Shows TestHero character card - โœ… Character data persisted (level, stats, etc.) - โœ… Can click "Play" and enter game again --- ## ๐Ÿงช Test 6: Character Deletion **Steps:** 1. From character selection, click "Delete" on TestHero 2. Confirm deletion in popup 3. Wait for deletion **Expected:** - โœ… Shows confirmation dialog - โœ… Character card disappears after confirm - โœ… Shows "You don't have any characters yet" message - โœ… "Create New Character" card appears again - โœ… Shows "0 / 1 slots used" --- ## ๐Ÿงช Test 7: Validation Tests ### Character Name Validation 1. Try creating character with name: `ab` (too short) - โŒ Should show error: "Name must be between 3 and 20 characters" 2. Try creating character with name: `a very long name that exceeds twenty characters` - โŒ Should show error: "Name must be between 3 and 20 characters" 3. Create character named `Hero1`, then try creating another with same name - โŒ Should show error about name already exists ### Stat Allocation Validation 1. Try to allocate only 15 points (leave 5 remaining) - โŒ "Create Character" button should be DISABLED - โŒ Points remaining shows "5 / 20" in normal color 2. Try to allocate 25 points (5 over) - โŒ Should prevent going over 20 - โŒ Points remaining shows "-5 / 20" in RED 3. Allocate exactly 20 points - โœ… "Create Character" button becomes ENABLED - โœ… Points remaining shows "0 / 20" in GREEN --- ## ๐Ÿงช Test 8: Email Validation **Steps:** 1. Try to register with invalid emails: - `notanemail` - โŒ Should show error - `test@` - โŒ Should show error - `@example.com` - โŒ Should show error 2. Try to register with valid email: - `valid@example.com` - โœ… Should succeed **Expected:** - Email validation shows clear error message - Only valid email formats accepted --- ## ๐Ÿงช Test 9: Mobile Responsiveness **Steps:** 1. Open site on mobile browser (or resize browser to 375px width) 2. Navigate through all screens: - Login - Character selection - Character creation - Game **Expected:** - โœ… Login card fits screen, readable text - โœ… Character cards stack in single column - โœ… Character creation form is scrollable - โœ… All buttons are tappable (not too small) - โœ… No horizontal scrolling - โœ… Text is readable without zooming --- ## ๐Ÿงช Test 10: Error Handling ### Invalid Login 1. Try to login with wrong email: `wrong@example.com` - โŒ Should show error: "Authentication failed" 2. Try to login with wrong password - โŒ Should show error: "Authentication failed" ### Network Error Simulation 1. Open browser dev tools 2. Set network to "Offline" 3. Try to create character - โŒ Should show error message (not crash) 4. Set network back to "Online" 5. Try again - โœ… Should work normally --- ## ๐Ÿ“Š Success Criteria **All tests should pass:** - [x] Can register new account with email - [x] Can create character with 20 stat points - [x] Can select character and enter game - [x] Free account limited to 1 character - [x] Premium banner shows when at limit - [x] Can logout and login again - [x] Can delete characters - [x] Validation works correctly - [x] Email format validated - [x] Mobile responsive - [x] Errors handled gracefully --- ## ๐Ÿšจ If Something Doesn't Work ### Frontend Not Loading ```bash # Check PWA container logs docker logs echoes_of_the_ashes_pwa --tail 50 # Rebuild if needed cd /opt/dockers/echoes_of_the_ashes docker compose build echoes_of_the_ashes_pwa docker compose up -d echoes_of_the_ashes_pwa ``` ### API Errors ```bash # Check API logs docker logs echoes_of_the_ashes_api --tail 50 # Restart if needed docker compose restart echoes_of_the_ashes_api ``` ### Database Issues ```bash # Check if migration ran docker exec echoes_of_the_ashes_db psql -U eota_user -d echoes_of_the_ashes -c "\dt" # Should show: accounts, characters tables ``` ### Clear Browser Cache If frontend looks old: 1. Open browser dev tools (F12) 2. Right-click refresh button 3. Select "Empty Cache and Hard Reload" --- ## ๐Ÿ“ž Quick Commands ```bash # Check all containers docker ps # View all logs docker compose logs -f # Restart everything docker compose restart # Rebuild frontend docker compose build echoes_of_the_ashes_pwa && docker compose up -d echoes_of_the_ashes_pwa # Check database docker exec echoes_of_the_ashes_db psql -U eota_user -d echoes_of_the_ashes -c "SELECT COUNT(*) FROM accounts;" docker exec echoes_of_the_ashes_db psql -U eota_user -d echoes_of_the_ashes -c "SELECT COUNT(*) FROM characters;" ``` --- **Happy Testing!** ๐ŸŽฎ