6.0 KiB
Test Market & Sell Pages - RIGHT NOW! 🚀
✅ Current Status
Backend: ✅ Running on http://localhost:3000
API Key: ✅ STEAM_APIS_KEY configured in .env
Market Items: ✅ 23 items in database
🎯 Test 1: Market Page (30 seconds)
-
Open in browser:
http://localhost:5173/market -
What you should see:
- ✅ Items loading (no infinite spinner)
- ✅ Item cards with images and prices
- ✅ Filter sidebar on the left
- ✅ Grid of items
-
Try these:
- Filter by game (CS2/Rust)
- Search for "AK-47" or "Dragon Lore"
- Sort by price (high to low)
- Click on an item
Expected: Everything works, items load instantly
🎯 Test 2: Sell Page - Not Logged In (10 seconds)
-
Open in browser:
http://localhost:5173/sell -
What you should see:
- Redirect to home page (because not logged in)
Expected: Can't access sell page without login
🎯 Test 3: Login via Steam (1 minute)
-
Click "Login" button on the homepage
-
Authenticate with Steam:
- Enter Steam credentials
- Approve login
-
Make sure your Steam inventory is PUBLIC:
- Open Steam → Profile → Edit Profile → Privacy Settings
- Set "Game details" to Public
- Set "Inventory" to Public
-
After login:
- You should be back at the site
- Should see your username in navbar
🎯 Test 4: Sell Page - View Inventory (2 minutes)
-
Navigate to Sell page:
http://localhost:5173/sell -
What you should see:
- Loading spinner with "Loading your Steam inventory..."
- After 3-5 seconds: Your CS2 items appear
-
Check backend logs for:
🎮 Fetching CS2 inventory for Steam ID: 76561198XXXXXXX 📡 Calling: https://api.steamapis.com/steam/inventory/... ✅ Found XX marketable items in inventory
Expected: Your real CS2 items load with images and prices
🎯 Test 5: Select and View Items (1 minute)
-
Try these actions:
- Click on items to select them (should get blue border)
- Click again to deselect
- Select 2-3 items
- See the summary panel at top showing:
- Number of items selected
- Total value
-
Try filters:
- Search for item names
- Sort by price
- Switch to Rust (dropdown at top)
Expected: All interactions work smoothly
🎯 Test 6: Sell Items (2 minutes)
If you DON'T have Trade URL set:
-
You'll see:
- Orange warning banner at top
- "Trade URL Required" message
- "Sell Selected Items" button is disabled
-
Set Trade URL:
- Click "Set Trade URL in Profile" button
- Or go to profile page manually
- Add your Steam Trade URL
- Get it from: https://steamcommunity.com/id/YOUR_ID/tradeoffers/privacy
If you DO have Trade URL set:
-
Select some items (click to select)
-
Click "Sell Selected Items"
-
Confirmation modal appears:
- Shows number of items
- Shows total value
- Shows important note about trade offers
-
Click "Confirm Sale"
-
What should happen:
- ✅ Green success toast: "Successfully sold X items for $XX.XX"
- ✅ Blue info toast: "You will receive a Steam trade offer..."
- ✅ Balance updates in navbar
- ✅ Sold items disappear from inventory
- ✅ Modal closes
Expected: Sale completes successfully, balance updates
🐛 Common Issues & Fixes
Issue: "STEAM_API_KEY not configured"
Fix:
# Check .env file has:
STEAM_APIS_KEY=DONTABUSEORPEPZWILLNAGASAKI
# Restart backend:
# Press Ctrl+C
npm run dev
Issue: "Steam inventory is private"
Fix:
- Steam → Profile → Privacy Settings
- Set "Game details" and "Inventory" to Public
- Refresh sell page
Issue: No items in inventory
Reasons:
- You might not have CS2 items
- Try switching to Rust
- Inventory might be empty
Test with different account:
- Login with Steam account that has items
Issue: Market page still loading forever
Fix:
# Check if items exist in database:
node seed.js
# Restart frontend:
cd frontend
npm run dev
Issue: Backend not responding
Fix:
# Check if backend is running:
curl http://localhost:3000/api/health
# If not running, start it:
npm run dev
🎉 Success Checklist
Mark these off as you test:
Market Page:
- Items load without infinite spinner
- Can see item images and prices
- Filters work (game, rarity, wear)
- Search works
- Sorting works
- Can click items to view details
Sell Page (Logged Out):
- Redirects to home
Sell Page (Logged In):
- Loads Steam inventory
- Shows item images
- Shows estimated prices
- Can select/deselect items
- Summary shows correct count and total
- Can switch between CS2 and Rust
- Search and sort work
- Trade URL validation works
- Can sell items
- Balance updates after sale
- Items removed after sale
📊 What's Working vs What's Not
✅ WORKING NOW:
- Market page loads items from database
- Sell page loads real Steam inventory
- Item selection and pricing
- Trade URL validation
- Balance updates
- WebSocket notifications
⚠️ NOT YET IMPLEMENTED:
- Real pricing API (currently using placeholder algorithm)
- Steam trade offers (no bot integration yet)
- Inventory caching (fetches every time)
🚨 Quick Debug Commands
# Check backend health
curl http://localhost:3000/api/health
# Check market items
curl http://localhost:3000/api/market/items | jq
# Check if frontend is running
curl http://localhost:5173
# View backend logs
# (just look at terminal where npm run dev is running)
# Restart everything
# Backend: Ctrl+C then npm run dev
# Frontend: cd frontend && npm run dev
📝 Report Results
After testing, note:
What works:
What doesn't work:
Errors seen:
Browser console errors:
Backend log errors:
Time to test: 5-10 minutes
Current time: Just do it NOW! 🚀