Skip to main content

Manual Network Testing Guide - Wizard Retry Fix

URL: https://payroll-pipeline-cbs.vercel.app/ingestion
Date: 2026-02-06

🎯 Objective

Test the wizard save flow and verify:
  1. Save request succeeds (PUT 200)
  2. Readiness check retries if needed (1-3 GET requests)
  3. Wizard unblocks after save
  4. Persisted config visible after refresh

📋 Step-by-Step Testing

Step 1: Load Network Capture Script

  1. Navigate to: https://payroll-pipeline-cbs.vercel.app/ingestion
  2. Open DevTools: Press F12
  3. Go to Console Tab
  4. Copy the entire contents of scripts/capture_network_activity.js
  5. Paste into console and press Enter
Expected Output:
🔍 Network Activity Capture Script Loaded
✅ Script ready!
📝 Available Commands:
   showNetworkSummary()  - Show summary of captured requests
   clearNetworkCapture()  - Clear captured data
   exportNetworkData()    - Export data as JSON

Step 2: Navigate to Preflight Step

  1. Complete Map Columns step if needed
  2. Navigate to Preflight step
  3. Verify businesses are listed

Step 3: Save Business Configuration

  1. Find a business showing “not ready” status
  2. Click “Configure” button
  3. In the drawer:
    • Set PEPM rate to 12.00
    • Click “Save”
  4. Watch Console:
    • Should see: 📡 PUT /api/v1/admin/onboarding/businesses/{id}/save
    • Should see: ✅ PUT ... → 200 OK
    • Should see: 📡 GET /api/v1/intake/ingestion-wizard/readiness?...
    • May see multiple GET requests if retries occur

Step 4: Check Network Summary

In Console, run:
showNetworkSummary()
Expected Output:
📊 Network Activity Summary
============================

💾 Save Requests: 1
   1. PUT /api/v1/admin/onboarding/businesses/{id}/save
      Time: 2026-02-06T...
      Response: 200 OK

🔄 Readiness Requests: 1-3
   1. GET /api/v1/intake/ingestion-wizard/readiness?batch_id=...&period_label=2025-12-01
      Time: 2026-02-06T...
      Response: 200 OK
      Readiness: X/Y ready
   [Additional requests if retries occurred]

✅ Retry Logic Detected: X readiness requests
   Average delay between retries: ~500ms

Step 5: Verify UI Behavior

After Save Completes:
  • ✅ Drawer closes
  • ✅ Business shows as “ready”
  • ✅ Success toast: “Business configured successfully”
  • ✅ Processing button enables (if all businesses ready)

Step 6: Test Persistence

  1. Hard refresh: Ctrl+F5 (Windows) or Cmd+Shift+R (Mac)
  2. Navigate back to Preflight
  3. Click “Configure” on the same business
  4. Verify: PEPM rate still shows 12.00

🔍 What to Look For

✅ Success Indicators

Console Output:
  • 📡 PUT /save request logged
  • ✅ PUT ... → 200 OK response logged
  • 📡 GET /readiness requests logged (1-3)
  • ✅ GET ... → 200 OK responses logged
  • showNetworkSummary() shows expected counts
Network Tab (Manual Check):
  • PUT request to /api/v1/admin/onboarding/businesses/{id}/save
    • Status: 200 OK
    • Request Headers: x-org-id: cbs-main
    • Request Body: period_label: 2025-12-01
  • GET requests to /api/v1/intake/ingestion-wizard/readiness?...
    • Status: 200 OK
    • Query Params: period_label=2025-12-01
    • May see 1-3 requests if retry logic triggers
UI Behavior:
  • Drawer stays open during refresh
  • Business becomes “ready” after save
  • Persisted config visible after refresh

⚠️ Troubleshooting

Issue: No Requests Captured
  • Verify script loaded successfully
  • Check console for errors
  • Try clearNetworkCapture() and test again
Issue: Only One Readiness Request
  • This is normal if config is immediately queryable
  • No retries needed = backend is fast
  • Still a success!
Issue: Multiple Readiness Requests But Still Blocked
  • Check readiness response: Does it show is_ready: true?
  • Run showNetworkSummary() to see readiness data
  • Verify period_label matches between save and readiness query

📊 Expected Results

TestExpectedStatus
Save RequestPUT 200 OK
Readiness Requests1-3 GET requests
Retry Delay~500ms between retries
Wizard UnblocksBusiness shows as ready
PersistenceConfig visible after refresh

🛠️ Additional Commands

Clear captured data:
clearNetworkCapture()
Export data as JSON:
exportNetworkData()
Check specific request details:
// After running showNetworkSummary()
// Check the returned object
const summary = showNetworkSummary();
console.log(summary.allRequests);
console.log(summary.allResponses);

📝 Notes

  • Script captures all fetch requests automatically
  • Console logs show important requests in real-time
  • showNetworkSummary() provides detailed analysis
  • Retry logic works even if console logs don’t show (production builds)

Ready to test! Follow the steps above and use showNetworkSummary() to verify results.