littleshop/comprehensive-variant-test.sh
SysAdmin 5e90b86d8c Configure push notifications for internal-only access
- Changed VAPID subject from public URL to mailto format
- Updated docker-compose.yml to use mailto:admin@littleshop.local
- Removed dependency on thebankofdebbie.giize.com public domain
- All push notifications now work through VPN (admin.dark.side) only
- Added update-push-internal.sh helper script for deployment
- Improved security by keeping all admin traffic internal

Push notifications will continue working normally through FCM,
but all configuration and management stays on the internal network.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 21:15:42 +01:00

47 lines
1.7 KiB
Bash

#!/bin/bash
# Comprehensive Variant System E2E Test
# Tests all aspects of the variant collection system
BASE_URL="http://localhost:5000"
echo "========================================="
echo "VARIANT SYSTEM E2E TEST"
echo "========================================="
echo ""
echo "TEST 1: Check VariantCollections endpoint exists"
STATUS=$(curl -s -o /dev/null -w "%{http_code}" $BASE_URL/Admin/VariantCollections 2>&1)
echo "Status: $STATUS (Expected: 401 - auth required, or 200 if logged in)"
echo ""
echo "TEST 2: Check Products API returns variant fields"
curl -s $BASE_URL/api/catalog/products 2>&1 | grep -o '"variantCollectionId":[^,]*' | head -1
echo ""
echo "TEST 3: Check if any products have variants"
VARIANTS=$(curl -s $BASE_URL/api/catalog/products 2>&1 | grep -o '"variantsJson":"[^"]*"' | grep -v 'null')
if [ -z "$VARIANTS" ]; then
echo "No products with variants found"
else
echo "Products with variants:"
echo "$VARIANTS"
fi
echo ""
echo "TEST 4: Check VariantCollections API endpoint"
STATUS=$(curl -s -o /dev/null -w "%{http_code}" $BASE_URL/api/variant-collections 2>&1)
echo "API endpoint status: $STATUS (Expected: 200 or 401)"
echo ""
echo "TEST 5: Test database schema"
echo "Checking Products table for variant columns..."
# This would need sqlite3 installed
echo ""
echo "========================================="
echo "ISSUES TO FIX:"
echo "1. Edit form doesn't populate VariantCollectionId/VariantsJson"
echo "2. No dynamic variant input fields (users must edit JSON)"
echo "3. No API endpoint to fetch variant collection properties"
echo "4. No JavaScript to handle variant collection selection"
echo "5. No user guidance on variant JSON format"
echo "========================================="