Skip to main content

Browser Testing Instructions - Wizard Retry Fix

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

🚀 Quick Start

  1. Open Browser: Navigate to https://payroll-pipeline-cbs.vercel.app/ingestion
  2. Open DevTools: Press F12 or Right-click → Inspect
  3. Go to Console Tab: Clear existing logs
  4. Load Test Script: Copy contents of scripts/test_wizard_retry_fix_browser.js and paste into console, press Enter
  5. Test Save Flow: Follow steps below

📋 Test Steps

Step 1: Navigate to Preflight Step

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

Step 2: 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 (or any value)
    • Click “Save”
  4. Observe:
    • Drawer stays open during refresh
    • Network tab shows requests
    • Console shows logs

Step 3: Check Test Results

In Console Tab:
getWizardTestSummary()
Expected Output:
📊 Test Summary
===============
Save requests: 1
Readiness requests: 1-3 (depending on retries)
Retry logs detected: 0-2 (if retries occurred)

✅ Retry logic appears to be working (multiple readiness requests detected)
OR
ℹ️  Single readiness request (config immediately queryable - no retries needed)

Step 4: Verify Network Requests

In Network Tab:
  • PUT /api/v1/admin/onboarding/businesses/{id}/save200 OK
  • GET /api/v1/intake/ingestion-wizard/readiness?...200 OK
    • May see 1-3 requests if retry logic triggers
    • Query params should include period_label=2025-12-01

Step 5: Verify UI Behavior

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

Step 6: Test Persistence

  1. Hard refresh page: 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

  1. Network Tab:
    • PUT request succeeds (200 OK)
    • GET /readiness requests (1-3 depending on retries)
    • All requests include period_label parameter
  2. Console Tab:
    • No errors
    • Test script logs network activity
    • getWizardTestSummary() shows expected counts
  3. UI Behavior:
    • Drawer stays open during refresh
    • Business becomes “ready” after save
    • Persisted config visible after refresh

⚠️ Potential Issues

Issue: No Readiness Requests
  • Check if save actually succeeded (PUT 200)
  • Verify batchId and periodLabel are set
  • Check console for errors
Issue: Wizard Still Blocks
  • Check readiness response: Does it show is_ready: true?
  • Verify retry logic completed (check network tab for multiple requests)
  • Check if all businesses are ready (not just the saved one)
Issue: Drawer Shows Stale Data
  • Verify loadPreflight() completes before drawer closes
  • Check if business config fetch succeeds when opening drawer
  • Verify period_label matches between save and read

📊 Expected Test Results

TestExpected ResultStatus
Save succeedsPUT 200 OK
Readiness checkGET 200 OK (1-3 requests)
Retry logicMultiple requests if needed
Wizard unblocksBusiness shows as ready
PersistenceConfig visible after refresh

🛠️ Troubleshooting

Clear Test Logs

clearWizardTestLogs()

Check Network Activity

// In console, after test
getWizardTestSummary()

Manual Network Inspection

  1. Open Network tab
  2. Filter by “readiness” or “save”
  3. Check request/response details
  4. Verify period_label in query params

📝 Notes

  • Retry logs only appear in dev mode (production builds won’t show them)
  • Retry logic still works in production, just without console logs
  • If all retries fail, wizard proceeds anyway (save succeeded)
  • Backend eventual consistency typically resolves within 500ms-1s

Ready to test! Follow the steps above and report results.