Skip to content

Latest commit

 

History

History
177 lines (141 loc) · 5.67 KB

File metadata and controls

177 lines (141 loc) · 5.67 KB

Test Data Guide

Overview

This document provides a complete reference for the test data generated by the seed script to help with testing the property management application.

🔑 Login Credentials

Tenant Accounts

Username Password Unit Lease Status Rent Amount
john_tenant password123 Suite 101 ACTIVE $1,800
sarah_tenant password123 Suite 102 ACTIVE $2,100
mike_tenant password123 Suite 103 ACTIVE $1,950

Property Manager Account

Username Password Role
admin_pm password123 PROPERTY_MANAGER

🏢 Properties & Units

Property: Central Plaza

  • Total Units: 6
    • Suite 101 (Occupied by john_tenant)
    • Suite 102 (Occupied by sarah_tenant)
    • Suite 103 (Occupied by mike_tenant)
    • Suite 202 (Vacant)
    • Suite 203 (Vacant)
    • Suite 301 (Vacant)

🔨 Maintenance Requests

John Tenant (john_tenant)

  1. Leaking Faucet in Kitchen - PENDING - Medium Priority

    • Description: Kitchen faucet dripping constantly
    • Status: Unassigned
  2. HVAC Not Heating Properly - IN_PROGRESS - High Priority

    • Description: Heating not reaching set temperature (65°F)
    • Assigned to: Skyline HVAC Services
  3. Light Bulb Replacement - COMPLETED - Low Priority

    • Description: Hallway light bulb replacement
    • Assigned to: Alex Rivera
    • Completed: 2 days ago

Sarah Tenant (sarah_tenant)

  1. Water Leak from Ceiling - IN_PROGRESS - Emergency Priority
    • Description: Water leaking from bathroom ceiling
    • Assigned to: PlumbPro Solutions

Mike Tenant (mike_tenant)

  1. Broken Window Lock - PENDING - Medium Priority
    • Description: Bedroom window lock broken
    • Status: Unassigned

💰 Payment Records

John Tenant Payments

Amount Date Status
$1,800 2 months ago COMPLETED
$1,800 Last month COMPLETED
$1,800 Current month PENDING

Sarah Tenant Payments

Amount Date Status
$2,100 2 months ago COMPLETED
$2,100 Last month COMPLETED
$2,100 Current month PENDING

📝 Rental Applications

Applicant Email Income Employment Unit Status
Emily Johnson emily.johnson@example.com $5,000 Employed Full-Time Suite 202 PENDING
David Chen david.chen@example.com $6,500 Employed Full-Time Suite 203 PENDING
Lisa Martinez lisa.martinez@example.com $4,500 Employed Part-Time Suite 101 PENDING

👷 Technicians

Name Type Contact
Alex Rivera IN_HOUSE alex.rivera@example.com, +1-555-0100
Skyline HVAC Services VENDOR dispatch@skyline-hvac.example, +1-555-0155
PlumbPro Solutions VENDOR service@plumbpro.example, +1-555-0200

📊 Expenses (Property Manager View)

Description Amount Category Date
HVAC System Maintenance $850 MAINTENANCE 15 days ago
Landscaping Services $300 OTHER 10 days ago
Property Insurance $1,200 INSURANCE 5 days ago

🧪 Testing Scenarios

Scenario 1: Tenant Dashboard

  1. Login as john_tenant
  2. View dashboard showing:
    • Active lease for Suite 101
    • 3 maintenance requests (1 pending, 1 in-progress, 1 completed)
    • 3 payment records (2 completed, 1 pending)

Scenario 2: Submit Maintenance Request

  1. Login as any tenant
  2. Navigate to maintenance section
  3. Submit new request
  4. Verify it appears in pending requests

Scenario 3: Property Manager Dashboard

  1. Login as admin_pm
  2. View dashboard showing:
    • 3 active leases
    • 5 total maintenance requests
    • 3 rental applications pending review
    • Expense tracking with $2,350 total

Scenario 4: Application Review

  1. Login as admin_pm
  2. Navigate to rental applications
  3. Review applications from Emily Johnson, David Chen, and Lisa Martinez
  4. Approve or reject applications

Scenario 5: Maintenance Management

  1. Login as admin_pm
  2. View all maintenance requests
  3. Assign pending requests to technicians
  4. Update status of in-progress requests
  5. Complete requests

Scenario 6: Payment History

  1. Login as tenant
  2. View payment history
  3. See completed and pending payments
  4. (If implemented) Make a payment

🔄 Re-seeding the Database

To reset the database and re-run the seed script:

cd tenant_portal_backend
npx prisma migrate reset --skip-generate
npm run db:seed

Or just seed without resetting:

cd tenant_portal_backend
npm run db:seed

📝 Notes

  • All passwords are set to password123 for easy testing
  • Lease dates are set relative to current date (6 months ago start, 1 year from now end)
  • Payment dates use relative dates (current month, last month, 2 months ago)
  • All maintenance requests have realistic descriptions and priorities
  • Rental applications include contact info and income details for screening
  • Property manager can access all features while tenants have restricted access

🎯 Testing Checklist

  • Tenant can login and see their dashboard
  • Tenant can view their lease details
  • Tenant can see maintenance requests
  • Tenant can view payment history
  • Property Manager can login and see all data
  • Property Manager can view all leases
  • Property Manager can manage maintenance requests
  • Property Manager can review rental applications
  • Property Manager can view expense reports
  • Navigation works correctly for both roles
  • Role-based access control prevents unauthorized access
  • Error pages (404, 403) function correctly