← Back to Projects
QA Testing

R.S.M Repair Shop — Bug Test Plan

Regression test plan covering auth, Docker, data sync, pricing, analytics, printing, and WhatsApp integration bugs found during CRM development.

QABug TestingWeb AppNext.js

RSM Repair Shop — Bug-Driven Test Plan

This file documents bugs discovered during development (from conversation history) and converts them into regression test cases to verify before each deployment.


1. Authentication & Multi-PC Access

#Test CaseStepsExpectedBug That Led to This
A1Login redirects correctly on client PCsFrom a second PC on LAN, go to http://<server-ip>:<port>Redirected to /login, can log in, lands on dashboardNEXTAUTH_URL=localhost caused auth redirects to send clients to their own machine instead of the server
A2Server is reachable from other PCsFrom a second PC, open http://<server-ip>:3001Page loads (not ERR_CONNECTION_REFUSED)Docker port was bound to 127.0.0.1 instead of 0.0.0.0, blocking LAN access
A3App does not crash on startup with UntrustedHostStart containers with docker compose up -d, check logsNo UntrustedHost error, app starts cleanlyMissing AUTH_TRUST_HOST=true in Docker env caused crash loop

2. Docker & Prisma CLI

#Test CaseStepsExpectedBug That Led to This
B1db push uses correct Prisma versionRun docker compose exec app node_modules/.bin/prisma db push --skip-generateCompletes without version mismatch errorsRunning npx prisma db push silently fetched Prisma 7.8.0, mismatching the 6.19.3 client in the image
B2App starts after db pushAfter running db push, visit the appApp responds normally, no Cannot find module 'effect' errorPrisma 7 introduced effect as a required dependency not present in the runner image
B3bcryptjs is available in production imageLog in as admin after building and deploying imageLogin succeeds, no Cannot find module 'bcryptjs/umd/index.js'bcryptjs was not copied into the standalone Docker image

3. Data Sync Between PCs

#Test CaseStepsExpectedBug That Led to This
C1Repairs list refreshes automaticallyOn PC-A, create a repair. On PC-B, wait up to 5 secondsNew repair appears on PC-B without manual refreshSWR polling was set to 30s for repairs (was reduced to 5s)
C2Repair detail refreshes after status changeOn PC-A, change repair status. On PC-B, view the same repairStatus updates within 5 secondsSame polling issue as C1

4. Repair Detail — Price & Cost Fields

#Test CaseStepsExpectedBug That Led to This
D1Old repairs with finalCost still show their priceOpen a repair created before the labor/parts split was introducedSidebar shows “מחיר סופי (ישן)” with the correct amountAfter adding laborCost/partsCost, old repairs with only finalCost showed ₪0 because totalCost was computed from the new fields only
D2Price of ₪0 shows as ₪0, not “טרם נקבע”Set labor cost to 0 on a repairDisplays “₪0”, not “טרם נקבע”Decimal(0) is truthy in JavaScript, was initially at risk of showing wrong label
D3Decimal prices display correctlySet labor cost to ₪1500.50Displays “₪1500.5”, not [object Object]Prisma returns Decimal objects; String(Decimal) works correctly but needed verification
D4Total cost = labor + partsSet עלות עבודה to ₪200, עלות חלקים to ₪150Total shows ₪350Computed client-side — verify the addition is correct

5. Analytics & Excel Export

#Test CaseStepsExpectedBug That Led to This
E1Analytics page loads without TypeScript errorsOpen /analytics pagePage loads, no console errorsAfter adding technicianName to schema, Prisma client types were stale — 14 TypeScript errors referencing technicianName didn’t exist on the type
E2Analytics revenue counts old finalCost repairsView analytics with date range covering old repairsTotal revenue includes old repairs (those with finalCost only)Analytics used only laborCost+partsCost initially, missing revenue from repairs created before the split
E3Excel export contains “עלות עבודה” and “עלות חלקים” columnsExport to Excel from analytics pageEach row has separate labor and parts columnsOriginal export had a single “מחיר” column using finalCost
E4Excel export for technician totals separates labor/partsOpen exported file, check “לפי טכנאי” sheetColumns: טכנאי, כמות תיקונים, הכנסות עבודה, הכנסות חלקיםTechnician sheet originally had a single revenue column

6. Print Page

#Test CaseStepsExpectedBug That Led to This
F1Print page fits on one A4 pageOpen /print/<id>, press Ctrl+PSingle page, no content cut off, no blank second pageAdding overflow: hidden or fixed height: 297mm caused content to clip and produce a blank second page
F2Print page shows correct OS install priceOpen any repair print page, check item 15 in the termsShows “300 ₪” not “250 ₪“Old T&Cs had outdated 250₪ price
F3Warranty shows only chosen optionOpen print page for a warranty repairShows “אחריות” only — not both “אחריות / תשלום”Original print showed both options with a circle-one instruction

7. WhatsApp Messages

#Test CaseStepsExpectedBug That Led to This
G1Phone number formatted correctly for Israeli numbersTrigger WhatsApp on a repair with phone 052-1234567URL uses 972521234567 (no leading 0, with country code)Phone formatting needed explicit handling of the leading 0972 conversion
G2Phone with +972 prefix formats correctlyPhone stored as +972-52-1234567URL uses 972521234567 (no double country code)+ and - stripped by replace(/\D/g, ""), then no 0 prefix so country code is kept as-is
G3WhatsApp message shows correct total priceSet labor ₪200 + parts ₪150, click WhatsApp buttonMessage says “עלות התיקון הינו 350 ש״ח”After cost split, handleWhatsApp initially still used the old finalCost field
G4Review message opens on COMPLETED statusChange repair status to “הושלם”WhatsApp opens with Google review link messageFeature was implemented but emoji (😊) in the message showed as replacement character on the recipient’s phone
G5Review message has no broken charactersSend review WhatsApp to a test numberMessage received correctly with no or replacement charactersEmoji in source file was corrupted by Windows file encoding — fixed by removing emoji entirely

8. Repair Edit Mode

#Test CaseStepsExpectedBug That Led to This
H1Editing customer name reflects in customer listOpen a repair, click ערוך, change first/last name, saveCustomer list page shows the updated nameCustomer record is updated via PATCH /api/customers/:id in parallel with repair/device updates
H2Edit mode cancel reverts all fieldsOpen edit mode, change several fields, click בטלAll fields revert to previous values, nothing savedEdit state is initialized from repair data — cancel just discards local state
H3Device type change saves correctlyIn edit mode, change device type from LAPTOP to DESKTOP, saveSaved device type shows DESKTOPRequired new PATCH /api/devices/:id endpoint which didn’t exist before

9. Seeding & First-Run Setup

#Test CaseStepsExpectedBug That Led to This
I1Seed command works in PowerShellRun seed script via PowerShell heredocAdmin user created, login worksPowerShell broke heredoc quotes in the seed command, causing SyntaxError: Invalid or unexpected token
I2App recovers after unexpected downtimeContainer shows “Up” in docker ps but app is unresponsivedocker compose restart app restores serviceContainer process crashed inside Docker (memory issue) while Docker reported the container as running — no healthcheck was in place to auto-restart

Pre-Deployment Checklist

Before building and pushing a new Docker image, verify:

  • npx tsc --noEmit → zero errors
  • npm run lint → zero errors
  • npm run build → builds successfully
  • After db push on work PC: login works, repairs list loads, analytics loads
  • Test WhatsApp button on a repair (check phone format and message content)
  • Test print page: single A4, terms visible, warranty shows correct option
  • Test from a second PC on the LAN: can log in, sees live data