# Comprehensive Tarot System Test

This test script validates that all 10 tarot spread types are working correctly with GPT-5-nano integration.

## What It Tests

1. **All 10 Spread Types:**
   - Past • Present • Future
   - Situation • Action • Outcome
   - Mind • Body • Spirit
   - Challenge • Help • Outcome
   - 🦋 Sacred Healing • Transformation
   - 💕 Sacred Union (Couples Spread)
   - ✨ Anniversary • Celebration
   - 🌙 New Moon • Manifestation
   - ⭐ The Year Ahead • Destiny
   - 🐾 Pet & Companion Guidance

2. **GPT-5-nano Integration:**
   - Verifies API responses for each spread type
   - Checks response times
   - Validates word count (should be 1200-1800 words)

3. **Personalization Features:**
   - Name addressing (Jenna/Adam)
   - Astrological references (Capricorn)
   - Lunar phase integration
   - Seasonal awareness

## How to Run

### On Production Server

```bash
# SSH into server
ssh root@198.211.114.12

# Navigate to janda directory
cd /var/www/adampowell.pro/janda

# Run test with your password
node test-all-tarot-spreads.js YOUR_PASSWORD_HERE
```

### Locally (if testing against localhost)

```bash
cd "C:\ADAMANT\ADAMPOWELL PRO\adampowell.pro"
node test-all-tarot-spreads.js YOUR_PASSWORD_HERE
```

## What You'll See

The script will:
1. Login as user J (Jenna)
2. Test each of the 10 spread types one by one
3. Generate random cards and realistic questions for each spread
4. Call the `/api/tarot` endpoint
5. Validate the response
6. Check for personalization markers

## Sample Output

```
================================================================================
🔮 COMPREHENSIVE TAROT SYSTEM TEST
Testing all 10 spread types with GPT-5-nano integration
================================================================================

🔐 Logging in as user J (Jenna)...
✅ Login successful!

================================================================================
Testing: Challenge • Help • Outcome
================================================================================
Question: "My husband is struggling with deep rooted PTSD and ADHD. Provide guidance."
Cards (3): The Fool (R), The Magician (R), The Chariot (R)

✅ SUCCESS (45.32s)
📊 Response length: 1584 words

🎯 Personalization Check:
   Name (Jenna): ✓
   Astrology (Capricorn): ✓
   Lunar Phase: ✓
   Season: ✓

📖 Reading snippet:
   "Dearest Jenna, beloved daughter of winter's discipline and Capricorn's unwavering fire..."

================================================================================
📊 TEST SUMMARY
================================================================================

Total spreads tested: 10
✅ Successful: 10
❌ Failed: 0

⏱️  Average response time: 42.5s
📝 Average word count: 1612 words

🎯 Personalization Coverage:
   Name (Jenna): 10/10 (100%)
   Astrology: 9/10 (90%)
   Lunar Phase: 10/10 (100%)
   Season: 10/10 (100%)
```

## Troubleshooting

**Login Failed:**
- Make sure you're passing the correct password as the first argument
- Check that the JANDA server is running: `pm2 status janda-app`

**Connection Timeout:**
- GPT-5-nano responses can take 30-120 seconds
- The script has a 130-second timeout per request
- This is normal for detailed readings

**Module Not Found:**
- Make sure you run from the `/var/www/adampowell.pro/janda` directory
- axios and other dependencies are installed there

## Files

- `test-all-tarot-spreads.js` - Main test script
- `TEST-README.md` - This file
