Validation & Errors¶
Use this page as a checklist when implementing validation and QA.
Customer (Step 1)¶
- [ ] First Name required
- [ ] Last Name required
- [ ] Require at least one contact method (phone or email)
- [ ] Phone number normalized and validated by country code
- [ ] Customer is registered in Odoo successfully
Package (Step 2)¶
- [ ] Selection required before continue
- [ ] Package list loads successfully (empty state handled)
- [ ] Package includes main product and battery swap privilege
Subscription (Step 3)¶
- [ ] Selection required before continue
- [ ] Subscriptions are compatible with selected package
- [ ] Pricing displayed correctly and consistently formatted
- [ ] Frequency (weekly/monthly) is clearly shown
Preview (Step 4)¶
- [ ] Totals computed correctly
- [ ] Customer, package, and subscription details match selections
- [ ] Prevent collect payment if totals/details missing
Payment (Step 5)¶
- [ ] QR scanning permission handled (camera access)
- [ ] QR invalid/expired codes handled with retry
- [ ] Manual receipt supports validation and status lookup
- [ ] Payment confirmation result is stored and reflected in UI
- [ ] Subscription order is created in the backend on success
Vehicle (Step 6)¶
- [ ] QR scanning works and validates vehicle ID
- [ ] Vehicle is linked to the correct subscription
- [ ] Already-assigned vehicles are rejected with a clear error
- [ ] Camera permission handled
Battery (Step 7)¶
- [ ] QR scanning works and identifies battery
- [ ] BLE connection establishes successfully
- [ ] ATT service returns battery ID
- [ ] DTA service returns energy level
- [ ] Initial electricity cost is calculated correctly
- [ ] Service completion is reported to the backend
- [ ] BLE connection failure is handled with retry
Done (Step 8)¶
- [ ] Receipt displays all fields (name, phone, package, subscription ID, vehicle ID, battery, amount paid, temporary password)
- [ ] Temporary password is visible and correct
- [ ] New Registration button returns to Step 1