6.7 KiB
Quick Test Guide - Account/Character System
Test this NOW to verify everything works!
🧪 Test 1: New User Registration
Steps:
- Open https://echoesoftheashgame.patacuack.net
- Should redirect to login page
- Click "Don't have an account? Register"
- Enter email:
test@example.com - Enter password:
test123 - 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:
- From character selection, click "Create New Character" card
- Enter name:
TestHero - Allocate stats:
- Strength: 8
- Agility: 5
- Endurance: 4
- Intellect: 3
- Check "Points Remaining" shows 0
- Check HP preview shows 140 (100 + 4*10)
- Check Stamina preview shows 120 (100 + 4*5)
- 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:
- From character selection, click "Play" on TestHero
- 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:
- From game, click "TestHero" in header
- Should redirect to character selection
- 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:
- From character selection, click "Logout"
- Should redirect to login screen
- Enter same email:
test@example.com - Enter password:
test123 - 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:
- From character selection, click "Delete" on TestHero
- Confirm deletion in popup
- 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
-
Try creating character with name:
ab(too short)- ❌ Should show error: "Name must be between 3 and 20 characters"
-
Try creating character with name:
a very long name that exceeds twenty characters- ❌ Should show error: "Name must be between 3 and 20 characters"
-
Create character named
Hero1, then try creating another with same name- ❌ Should show error about name already exists
Stat Allocation Validation
-
Try to allocate only 15 points (leave 5 remaining)
- ❌ "Create Character" button should be DISABLED
- ❌ Points remaining shows "5 / 20" in normal color
-
Try to allocate 25 points (5 over)
- ❌ Should prevent going over 20
- ❌ Points remaining shows "-5 / 20" in RED
-
Allocate exactly 20 points
- ✅ "Create Character" button becomes ENABLED
- ✅ Points remaining shows "0 / 20" in GREEN
🧪 Test 8: Email Validation
Steps:
-
Try to register with invalid emails:
notanemail- ❌ Should show errortest@- ❌ Should show error@example.com- ❌ Should show error
-
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:
- Open site on mobile browser (or resize browser to 375px width)
- 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
-
Try to login with wrong email:
wrong@example.com- ❌ Should show error: "Authentication failed"
-
Try to login with wrong password
- ❌ Should show error: "Authentication failed"
Network Error Simulation
-
Open browser dev tools
-
Set network to "Offline"
-
Try to create character
- ❌ Should show error message (not crash)
-
Set network back to "Online"
-
Try again
- ✅ Should work normally
📊 Success Criteria
All tests should pass:
- Can register new account with email
- Can create character with 20 stat points
- Can select character and enter game
- Free account limited to 1 character
- Premium banner shows when at limit
- Can logout and login again
- Can delete characters
- Validation works correctly
- Email format validated
- Mobile responsive
- Errors handled gracefully
🚨 If Something Doesn't Work
Frontend Not Loading
# 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
# 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
# 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:
- Open browser dev tools (F12)
- Right-click refresh button
- Select "Empty Cache and Hard Reload"
📞 Quick Commands
# 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! 🎮