# RateRight QA Test Scripts
**Version:** 1.0  
**Date:** 2026-02-15  
**App URL:** https://rivet.rateright.com.au  
**Test Window:** ~90 minutes  

## 🎯 Quick Start Guide

**Before You Begin:**
1. Open https://rivet.rateright.com.au
2. Open browser console (F12) → Check for "Stripe test mode active"
3. Have test data ready (see each section)
4. Use fresh browser session (incognito mode)

---

## 1. Contractor Signup Flow (ABN Verification)
**Time:** 7 minutes | **Priority:** Critical

### Prerequisites
- Valid ABN (use: 53 104 690 743)
- Real email address (Gmail recommended)
- Business documents (PDF test file < 10MB)

### Test Steps
1. **Navigate:** Homepage → "Sign Up as Contractor"
2. **Basic Info:**
   - Email: [your-test-email]@gmail.com
   - Password: Test1234!
   - Business Name: Test Construction Pty Ltd
3. **ABN Verification:**
   - Enter: 53104690743
   - Click "Verify ABN"
   - **Expected:** Business details auto-populate
4. **Business Profile:**
   - Location: Sydney NSW 2000
   - Trade: Commercial Construction
   - Company Size: 11-50 employees
5. **Document Upload:**
   - Upload test PDF (create: echo "test" > test.pdf)
   - **Expected:** Upload success message
6. **Stripe Connect:**
   - Click "Connect Stripe Account"
   - **Expected:** Redirect to Stripe onboarding
   - Complete onboarding (test mode)
7. **Final Verification:**
   - Dashboard loads with "Contractor" badge
   - "Post New Job" button visible

### Pass/Fail Criteria
- ✅ ABN lookup returns business details
- ✅ Document upload accepts PDF < 10MB
- ✅ Stripe onboarding completes
- ✅ No console errors

### Known Issues
- ABN lookup fails for some business types
- Stripe redirect may take 10-15 seconds

---

## 2. Worker Signup Flow (Voice Profile)
**Time:** 5 minutes | **Priority:** Critical

### Prerequisites
- Secondary email address
- Mobile phone (AU format)
- Quiet environment for voice recording

### Test Steps
1. **Navigate:** Homepage → "Sign Up as Worker"
2. **Account Creation:**
   - Email: testworker-[date]@gmail.com
   - Password: Worker1234!
3. **Phone Validation:**
   - Enter: 0412 345 678
   - **Expected:** Format validation (04xx xxx xxx)
4. **Email Verification:**
   - Check email → Click verification link
   - **Expected:** Redirect to profile completion
5. **Profile Setup:**
   - Name: John Test Worker
   - Location: Parramatta NSW 2150
   - Trade: Steel Fixer
   - Experience: 3-5 years
6. **Voice Profile:**
   - Click "Record Voice Introduction"
   - Allow microphone access
   - Record: "Hi, I'm John, experienced steel fixer looking for work in Sydney"
   - **Expected:** 30-second recording saved
7. **Skills Selection:**
   - Select: Steel Fixing, Concrete Work, Formwork
   - Add certification: "White Card - 2024"

### Pass/Fail Criteria
- ✅ Phone accepts only AU format
- ✅ Voice recording saves and plays back
- ✅ Profile shows 100% completion
- ✅ Dashboard shows job recommendations

### Known Issues
- Voice recording may fail on Safari iOS
- Skills dropdown slow on mobile

---

## 3. Job Posting Flow (Voice-to-Job)
**Time:** 5 minutes | **Priority:** High

### Prerequisites
- Contractor account (from test #1)
- Sample job requirements

### Test Steps
1. **Login:** Use contractor account
2. **Create Job:**
   - Click "Post New Job"
   - Title: "Steel Fixers Needed - CBD Project"
3. **Voice Input Test:**
   - Click microphone icon
   - Say: "Need 3 steel fixers for 2 week project in Sydney CBD starting Monday"
   - **Expected:** Text appears in description
4. **Job Details:**
   - Location: Sydney CBD
   - Duration: 2 weeks
   - Rate: $35/hour
   - Start Date: Next Monday
5. **Requirements:**
   - Skills: Steel Fixing (Required)
   - Experience: 2+ years
   - Certifications: White Card
6. **Publish:**
   - Review summary
   - Click "Publish Job"
   - **Expected:** Job appears in "My Jobs" list

### Pass/Fail Criteria
- ✅ Voice input converts speech accurately
- ✅ Job appears in search results within 30 seconds
- ✅ Can edit job after publishing
- ✅ No duplicate job creation

### Known Issues
- Voice input struggles with accents
- Long descriptions may truncate

---

## 4. Smart Matching Algorithm
**Time:** 5 minutes | **Priority:** High

### Prerequisites
- Published job (from test #3)
- Worker account with matching skills

### Test Steps
1. **Worker View:**
   - Login as worker
   - Navigate to "Find Jobs"
   - **Expected:** CBD job appears with match score
2. **Match Score Check:**
   - Verify score > 80% for steel fixer
   - Check match reasons:
     - ✓ Skills match
     - ✓ Location within 30km
     - ✓ Experience level
3. **Filter Test:**
   - Apply filter: "Steel Fixing"
   - Sort by: "Best Match"
   - **Expected:** CBD job appears first
4. **Contractor View:**
   - Login as contractor
   - View job applications
   - **Expected:** See applicant match scores

### Pass/Fail Criteria
- ✅ Match scores visible (0-100%)
- ✅ Relevant jobs ranked highest
- ✅ Match reasons clearly displayed
- ✅ Distance calculation accurate

### Known Issues
- Match scores may vary on mobile
- Location radius calculation inconsistent

---

## 5. Payment Flow (Stripe Test Mode)
**Time:** 10 minutes | **Priority:** Critical

### ⚠️ CRITICAL CHECK
**Before testing:**
1. Open console (F12)
2. Look for: "Stripe test mode active"
3. If you see "live mode" → STOP, contact Builder

### Prerequisites
- Job posted (test #3)
- Worker account that can apply

### Test Steps
1. **Worker Application:**
   - Login as worker
   - Apply to CBD job
   - Add message: "Available immediately"
2. **Contractor Hire:**
   - Login as contractor
   - View application
   - Click "Hire Worker"
3. **Payment Entry:**
   - Card: 4242 4242 4242 4242
   - Expiry: 12/25
   - CVC: 123
   - Amount: $50.00
4. **Payment Processing:**
   - Click "Pay Now"
   - **Expected:** Success in < 5 seconds
5. **Post-Payment Verification:**
   - Messaging unlocks
   - Worker's phone visible
   - Email confirmation received

### Test Failure Scenarios
1. **Declined Card:**
   - Use: 4000 0000 0000 0002
   - **Expected:** Clear error message
2. **3D Secure:**
   - Use: 4000 0025 0000 3155
   - **Expected:** 3D secure prompt

### Pass/Fail Criteria
- ✅ Payment processes in < 5 seconds
- ✅ Messaging immediately available
- ✅ Email confirmation received
- ✅ No duplicate charges

### Known Issues
- Payment may hang on slow connections
- Email delivery can be delayed

---

## 6. Messaging System
**Time:** 5 minutes | **Priority:** Medium

### Prerequisites
- Successful payment (test #5)

### Test Steps
1. **Initial Message:**
   - Login as contractor
   - Send: "Hi, can you start Monday?"
   - **Expected:** Message shows "Delivered"
2. **Reply Test:**
   - Login as worker
   - Reply: "Yes, what time?"
   - **Expected:** Real-time notification
3. **File Sharing:**
   - Upload site map (PDF)
   - **Expected:** File appears in chat
4. **Message History:**
   - Refresh page
   - **Expected:** All messages persist

### Pass/Fail Criteria
- ✅ Messages deliver instantly
- ✅ File uploads < 10MB work
- ✅ Notifications received
- ✅ History persists across sessions

### Known Issues
- Large images may compress poorly
- Notifications may duplicate

---

## 7. Mobile Responsiveness Checks
**Time:** 5 minutes | **Priority:** Medium

### Prerequisites
- Chrome DevTools or real mobile device

### Test Steps
1. **Responsive Check:**
   - Open DevTools → Toggle device toolbar
   - Test: iPhone SE, iPad, Desktop
2. **Touch Targets:**
   - All buttons > 48px
   - Forms easy to fill
3. **Navigation:**
   - Hamburger menu works
   - Back button navigation
4. **Key Flows on Mobile:**
   - Signup process
   - Job application
   - Payment flow

### Pass/Fail Criteria
- ✅ No horizontal scrolling
- ✅ Touch targets appropriately sized
- ✅ Text readable without zoom
- ✅ All features work on mobile

### Known Issues
- Tables may overflow on small screens
- Voice recording UI cramped on iPhone SE

---

## 🏃‍♂️ 90-Minute Testing Schedule

| Time | Activity |
|------|----------|
| 0-10 min | Setup, account creation |
| 10-30 min | Contractor flows (tests 1, 3) |
| 30-50 min | Worker flows (tests 2, 4) |
| 50-70 min | Payment testing (test 5) |
| 70-80 min | Messaging & ratings |
| 80-90 min | Mobile checks, documentation |

## 📋 Quick Issue Reporting Template

```
**Test:** [Test Name]
**Browser:** [Chrome/Firefox/Safari]
**Device:** [Desktop/Mobile]
**Issue:** [Brief description]
**Steps:** [What you did]
**Expected:** [What should happen]
**Actual:** [What happened]
**Screenshot:** [Attach if possible]
```

## 🚨 Critical Issues - Stop Testing

Stop immediately if you encounter:
1. Stripe in live mode (not test)
2. Payment processing real money
3. Data loss (profiles, jobs, messages)
4. Security issues (data exposure)
5. Complete feature failure (can't signup/login)

Contact Builder via Rivet bridge immediately.