FleetOS Testing Guide - Phase 1 Sprint 1

Complete guide to test the Public Request Page β†’ Pending Queue β†’ Status Workflow


Prerequisites

Before testing, ensure you have:


Step 1: Run Database Migration

1.1 Open Supabase SQL Editor

  1. Go to your Supabase project dashboard

  2. Navigate to SQL Editor in the left sidebar

  3. Click New Query

1.2 Run Migration Script

Copy and paste the entire contents of:

Then click Run (or press Ctrl+Enter)

1.3 Verify Tables Created

Run this query to verify:

You should see:

  • βœ… 4 new columns in service_requests

  • βœ… 2 new tables (fleetos_viral_events, fleetos_r0_tracking)


Step 2: Create Test Supplier

2.1 Insert Test Supplier

Run this SQL in Supabase:

2.2 Create Test User for Supplier Login

Run this SQL:


Step 3: Start Development Server

3.1 Install Dependencies (if not already done)

3.2 Start Dev Server

Server should start on http://localhost:5173 (or similar)


Step 4: Test Public Request Page

4.1 Navigate to Request Page

Open browser and go to:

4.2 Fill Out Request Form

Company / Fleet Name: ABC Logistics Phone / WhatsApp: +13055559999 Email: fleet@abclogistics.com Vehicle / Asset: Truck #402 Location: 1200 Brickell Ave, Miami FL Urgency: TODAY (yellow) Request Description: Flat tire on delivery truck. Need service this afternoon.

Click Submit Service Request

4.3 Verify Success Page

You should see:

  • βœ… Big green checkmark

  • βœ… Request reference ID

  • βœ… Urgency badge (🟑 TODAY)

  • βœ… Tracking URL with magic link token

  • βœ… "Add Another Supplier" button (after 2 seconds)

4.4 Verify Database Entry

In Supabase SQL Editor:

Expected results:

  • status: 'pending'

  • supplier_action_status: 'pending_supplier_action'

  • source_channel: 'web_form'

  • magic_link_token: (auto-generated string)


Step 5: Test Supplier Dashboard - Pending Queue

5.1 Login as Supplier

  1. Navigate to: http://localhost:5173/fleetos

  2. Click Login

  3. Select Supplier

  4. Choose "Miami Tire & Service" from dropdown

  5. Click Continue

5.2 View Pending Queue

You should see:

  • ⏳ Pending Fleet Requests section (yellow background)

  • Request card showing:

    • Fleet Name: ABC Logistics

    • Contact: +13055559999

    • Urgency: 🟑 TODAY

    • Vehicle: Truck #402

    • Location: 1200 Brickell Ave, Miami FL

    • Description: Flat tire on delivery truck...

5.3 Test Accept with Note

  1. Click "βœ“ Add to Queue" button

  2. Modal appears with textarea

  3. Enter note: "We can handle this today. Bring truck to our shop between 9 AM - 4 PM."

  4. Click "Confirm & Add to Queue"

5.4 Verify Request Moved

  • Request should disappear from Pending Queue

  • Request should appear in Today's Dispatch section below

  • Status buttons should show "βœ“ Accept & Start"

5.5 Verify Database Update

Expected:

  • status: 'acknowledged'

  • supplier_action_status: 'accepted_as_todo'

  • is_manual_todo: true

  • acknowledged_at: (timestamp)


Step 6: Test Status Workflow

6.1 Start Work

In Today's Dispatch section:

  1. Click "βœ“ Accept & Start" button

  2. Request status changes to "accepted"

  3. Button changes to "βœ“ Mark Complete"

6.2 Verify Database

Expected:

  • status: 'accepted'

  • accepted_at: (timestamp)

6.3 Complete Work

  1. Click "βœ“ Mark Complete" button

  2. Request status changes to "completed"

  3. Shows green badge: "βœ“ Completed"

6.4 Verify Final State

Expected:

  • status: 'completed'

  • completed_at: (timestamp)


Step 7: Test Invite Fleet Flow

7.1 Submit Another Request

Go to: http://localhost:5173/request/miami-tire-service

Fill out form:

  • Company: XYZ Transport

  • Phone: +13055558888

  • Vehicle: Van #108

  • Urgency: SCHEDULED

7.2 Invite Fleet

In Supplier Dashboard β†’ Pending Queue:

  1. Click "πŸ“§ Invite Fleet" button

  2. Wait for processing

7.3 Verify Invite Created

Expected:

  • inviter_type: 'supplier'

  • invitee_type: 'fleet'

  • status: 'pending'

  • expires_at: (7 days from now)

7.4 Verify Request Updated

Expected:

  • supplier_action_status: 'fleet_invited'

  • status: 'acknowledged'


Step 8: Test Decline Flow

8.1 Submit Third Request

Submit another test request with different company name

8.2 Decline with Reason

In Pending Queue:

  1. Click "βœ— Decline" button

  2. Enter reason: "Outside our service area"

  3. Click "Confirm Decline"

8.3 Verify Database

Expected:

  • status: 'declined'

  • supplier_action_status: 'declined'

  • decline_reason: 'Outside our service area'

  • declined_at: (timestamp)


Step 9: Test Pre-Population (Bonus)

9.1 Manually Add Query Parameters

Open browser:

9.2 Verify Form Pre-filled

Form should show:

  • Company / Fleet Name: PrepopCo (disabled, grayed out)

  • Phone: +13055557777 (disabled, grayed out)

  • Other fields: empty and editable


Expected Results Summary

After completing all tests, you should have:

βœ… Database:

  • Multiple service_requests with different statuses

  • At least 1 fleetos_invite record

  • New columns populated (source_channel, magic_link_token, etc.)

βœ… UI Flow:

  • Public request page works

  • Success page displays with tracking link

  • Pending queue shows requests

  • Accept with note works

  • Requests move to Today's Dispatch

  • Status workflow (accept β†’ complete) works

  • Invite fleet creates invite

  • Decline removes from queue

βœ… Notifications:

  • Console logs show notification attempts

  • (WhatsApp/Email won't actually send without API keys)


Troubleshooting

Issue: "Table does not exist"

Solution: Run the migration script in Step 1

Issue: "Supplier not found"

Solution: Make sure you created test supplier in Step 2

Issue: "Cannot read properties of null"

Solution: Check Supabase credentials in .env file

Issue: Request doesn't appear in queue

Solution:

  1. Check browser console for errors

  2. Verify supplier_action_status = 'pending_supplier_action'

  3. Check that supplier_id matches

Issue: Buttons don't work

Solution:

  1. Check browser console for errors

  2. Verify AuthService session exists

  3. Try refreshing the page


Next Steps After Testing

Once testing is complete:

  1. βœ… Document any bugs found

  2. βœ… Take screenshots of working flow

  3. βœ… Decide on next phase:

    • Phase 1.2: WhatsApp/Email routing

    • Phase 2: Viral mechanics

    • Production: Deploy to real Supabase + domain


Questions? Check the browser console and Supabase logs for detailed error messages.

Last updated

Was this helpful?