linkscout-backend / QUICK_TEST_GUIDE.md
zpsajst's picture
Initial commit with environment variables for API keys
2398be6

πŸš€ QUICK TEST GUIDE - LinkScout Extension

βœ… Server Status

Server Running: http://localhost:5000
Models Loaded: 8 (RoBERTa, Emotion, NER, Hate, Clickbait, Bias, Custom, Categories)
Groq AI: Active (4 Agents)
Revolutionary Detection: Active (8 Phases)

πŸ§ͺ Testing Steps

Step 1: Reload Extension

1. Open Chrome
2. Go to: chrome://extensions
3. Find "LinkScout"
4. Click "Reload" button
5. Check for errors in console (should be none)

Step 2: Test on BBC Article

1. Navigate to: https://www.bbc.com/news/articles/czxk8k4xlv1o
2. Click LinkScout icon in toolbar
3. Click "Scan Page" button
4. Wait for analysis (10-15 seconds)

Step 3: Verify Sidebar Display

βœ… Check These Sections Appear:

  1. Header

    • Verdict (FAKE/SUSPICIOUS/CREDIBLE)
    • Misinformation percentage
    • Total paragraphs analyzed
  2. Groq AI Research (Purple card)

    • Research summary with sources
  3. Detailed Analysis (Pink card)

    • Pattern analysis
  4. Final Conclusion (Green card)

    • Verdict
  5. βœ… NEW: What is Correct (Green)

    • Facts that are accurate
  6. βœ… NEW: What is Wrong (Red)

    • Misinformation identified
  7. βœ… NEW: What Internet Says (Blue)

    • Credible sources' consensus
  8. βœ… NEW: My Recommendation (Yellow)

    • Expert advice
  9. βœ… NEW: Why This Matters (Orange)

    • Significance explanation
  10. Pre-trained Models (Light purple)

    • RoBERTa: X% Fake
    • Emotion: anger/fear/etc.
    • Hate Speech: X%
    • Clickbait: X%
    • Bias: biased/neutral
    • βœ… Custom Model: X% (NEW!)
    • βœ… Categories: Politics, War... (NEW!)
    • Named Entities: Names, places...
  11. Revolutionary Detection (8 Phases)

    • Linguistic Fingerprint
    • Claim Verification
    • Source Credibility
    • Entity Verification
    • Propaganda Analysis (techniques list - NO ERROR!)
    • Verification Network
    • Contradiction Detection
    • Network Analysis
  12. βœ… NEW: Google Search Results (Yellow card)

    • 5+ fact-checking links
    • Clickable URLs
    • Snippets from sources
  13. Suspicious Paragraphs List

    • Each paragraph with score
    • "Why Flagged" explanation
    • Click-to-scroll functionality

βœ… Expected Results

No Errors

  • ❌ propaganda.techniques.join is not a function β†’ Should NOT appear
  • ❌ data.X is undefined β†’ Should NOT appear
  • βœ… All sections load properly
  • βœ… Sidebar scrolls smoothly

Correct Display

  • βœ… All 5 new sections appear (what's right/wrong/internet/recommendation/why)
  • βœ… Google search results with clickable links
  • βœ… Custom model percentage shown
  • βœ… Categories/labels displayed
  • βœ… Propaganda techniques shown as comma-separated list (no error)

Functionality

  • βœ… Click suspicious paragraph β†’ scrolls to it on page
  • βœ… Paragraph flashes blue when clicked
  • βœ… Click Google result link β†’ opens in new tab
  • βœ… Sidebar scrollable with all content

πŸ› If You See Errors

Error: "propaganda.techniques.join is not a function"

Status: βœ… SHOULD BE FIXED NOW If still appears:

  1. Check browser console for exact error
  2. Hard reload extension (Ctrl+Shift+R on chrome://extensions)
  3. Check server terminal output

Error: "Cannot read property 'X' of undefined"

Solution:

  1. Check if server is running (http://localhost:5000/health)
  2. Check network tab for failed requests
  3. Reload page and try again

Error: Missing sections in sidebar

Solution:

  1. Open DevTools (F12)
  2. Check Console for JavaScript errors
  3. Check Network tab for response data
  4. Verify server returned all fields

πŸ“Š Sample Expected Output

Console (should see):

βœ… Analysis complete
πŸ“Š Verdict: SUSPICIOUS - VERIFY
πŸ“ˆ Misinformation: 65%
πŸ“‹ Chunks: 40 analyzed, 8 fake, 15 suspicious

Sidebar (should show):

🚨 SUSPICIOUS - VERIFY
Misinformation: 65%
Analyzed: 40  Suspicious: 23  Safe: 17

πŸ€– GROQ AI RESEARCH REPORT
Based on my research of credible sources...

βœ”οΈ WHAT IS CORRECT:
- Fact 1
- Fact 2

❌ WHAT IS WRONG:
- Misinformation 1
- Misinformation 2

🌐 WHAT THE INTERNET SAYS:
Credible sources indicate...

πŸ’‘ MY RECOMMENDATION:
Readers should verify...

⚠️ WHY THIS MATTERS:
This is significant because...

πŸ€– PRE-TRAINED ML MODELS
πŸ”Ή RoBERTa: 72% Fake
πŸ”Ή Custom Model: 68% Misinformation
πŸ”Ή Categories: Politics, War & Conflict

πŸ“’ PROPAGANDA ANALYSIS
Score: 100/100
Techniques: fear-mongering, scapegoating, loaded-language

πŸ”— GOOGLE SEARCH RESULTS
πŸ“Œ Snopes Fact Check
   [https://snopes.com/...]
   "This claim has been debunked..."

🚨 SUSPICIOUS PARAGRAPHS (23)
πŸ“ Para 1 [85/100]
Why Flagged:
β€’ Fake: 85%, Custom: 68%
β€’ Emotion: anger, Hate: 45%
πŸ‘† Click to jump

βœ… Success Criteria

Your test is SUCCESSFUL if you see:

  • No console errors
  • All 5 new sections (what's right/wrong/internet/recommendation/why)
  • Google search results with links
  • Custom model percentage
  • Categories/labels
  • Propaganda techniques (no .join() error)
  • Suspicious paragraphs with explanations
  • Click-to-scroll works
  • Sidebar displays all content

🎯 Quick Verification Checklist

Run through this 2-minute check:

  1. βœ… Server running? β†’ Check http://localhost:5000/health
  2. βœ… Extension reloaded? β†’ Check chrome://extensions
  3. βœ… Scan works? β†’ Click "Scan Page" on BBC article
  4. βœ… Sidebar opens? β†’ Should appear on right side
  5. βœ… No errors? β†’ Check browser console (F12)
  6. βœ… All sections present? β†’ Scroll through sidebar
  7. βœ… Links clickable? β†’ Click a Google result link
  8. βœ… Click-to-scroll works? β†’ Click a suspicious paragraph

If all 8 are βœ… β†’ SUCCESS! Your LinkScout extension is complete!


Ready to test now!
Server: βœ… Running
Extension: βœ… Ready
Features: βœ… 100% Complete

Test URL: https://www.bbc.com/news/articles/czxk8k4xlv1o