#!/bin/bash

echo "=== Testing CSS Loading on Staging ==="
echo ""

# Test master dashboard page
echo "1. Testing Master Dashboard Page CSS..."
response=$(curl -s https://upskill-staging.measurequick.com/master-trainer/dashboard/)
if echo "$response" | grep -q "hvac-common-style-css"; then
    echo "✅ hvac-common-style CSS is loading"
else
    echo "❌ hvac-common-style CSS NOT loading"
fi
if echo "$response" | grep -q "hvac-harmonized-framework-css"; then
    echo "✅ hvac-harmonized-framework CSS is loading"
else
    echo "❌ hvac-harmonized-framework CSS NOT loading"
fi
if echo "$response" | grep -q "hvac-community-events-css"; then
    echo "✅ hvac-community-events CSS is loading"
else
    echo "❌ hvac-community-events CSS NOT loading"
fi

echo ""
echo "2. Testing Trainer Dashboard CSS..."
response=$(curl -s https://upskill-staging.measurequick.com/trainer/dashboard/)
if echo "$response" | grep -q "hvac-common-style-css"; then
    echo "✅ hvac-common-style CSS is loading"
else
    echo "❌ hvac-common-style CSS NOT loading"
fi
if echo "$response" | grep -q "hvac-harmonized-framework-css"; then
    echo "✅ hvac-harmonized-framework CSS is loading"
else
    echo "❌ hvac-harmonized-framework CSS NOT loading"
fi
if echo "$response" | grep -q "hvac-community-events-css"; then
    echo "✅ hvac-community-events CSS is loading"
else
    echo "❌ hvac-community-events CSS NOT loading"
fi

echo ""
echo "=== CSS Test Complete ==="