E2E Test Runner
Full pipeline dry run — Trend Ingestion → OpenAI Generation → Render → Meta Publishing → Dashboard
Verify all required fields present in signal objects
Test reddit/hn/producthunt filter returns correct counts
Verify signals sort by velocity24h descending
Test unused → used transition when linked to script
Verify /api/ai/chat-completion is live and validating
Confirm OPENAI_API_KEY is configured in environment
Verify all signal fields injected into generation prompt
Test markdown code block extraction and JSON parse
Real API call to gpt-4o with minimal test prompt
Validate all allowed/blocked status transitions
Verify 0→100% monotonic progress with status update
Test search and status filter return correct results
Verify avg render time computed and formatted correctly
Verify /api/meta/publish is live and validating input
Verify /api/meta/engagement responds correctly
Test Meta webhook hub.challenge echo verification
Verify IG_ACCESS_TOKEN and IG_BUSINESS_ACCOUNT_ID present
Test comment keyword → DM rule matching algorithm
Validate all 7 KPI cards have correct values
Verify 4-phase statuses and active phase count
Validate 3 event types, colors, timing, and stack cap
Verify earnings, plays, and conversion rate calculations
Validate all sidebar routes use correct Next.js paths
Run tests to see output…