E2E SCENARIOS — CUSTOMERS, VEHICLES & PARTNERS (SUPPLIERS)
VietGara — Release 1.0–1.1 · Version 1.0 — September 28, 2026
Note (Release 5.0): a partner is a supplier. From Release 5.0 the Partners screen is called Suppliers, has no insurer type, and uses the
supplier.*permissions; scenario IDs are kept. Suppliers are never customers.
Covers FR-CUS-01, 02 and FR-SUP-01 (suppliers, delivered as “partners”), the personal-data consent record (Decree 13/2023) and the related permissions. Vehicle repair history (FR-CUS-03) is tested in 05_Quote_Pricing.md and 06_Repair_Order.md, where the records it lists come from. Records are in 00_Test_Data.md §3.3.
| ID | Title | Priority | Automation |
|---|---|---|---|
| E2E-CUS-001 | Create a customer with consent and find them by search | P1 | Automated (API, partial) |
| E2E-CUS-002 | Customer field validation | P2 | Automated (API, partial) |
| E2E-CUS-003 | Customer phone is unique within a garage only | P2 | Automated (API, partial) |
| E2E-CUS-004 | Edit a customer and withdraw consent | P2 | Automated (API, partial) |
| E2E-CUS-005 | Register a vehicle for a customer | P1 | Automated (API, partial) |
| E2E-CUS-006 | License plates are unique per garage, whatever the formatting | P2 | Automated (API, partial) |
| E2E-CUS-007 | Vehicle field validation | P3 | Automated (API, partial) |
| E2E-CUS-008 | Search vehicles | P2 | Automated (API, partial) |
| E2E-CUS-009 | Delete a vehicle, then a customer with vehicles | P2 | Automated (API, partial) |
| E2E-CUS-010 | Manage suppliers | P1 | Automated (API, partial) |
| E2E-CUS-011 | Supplier name is unique per garage | P3 | Automated (API, partial) |
| E2E-CUS-012 | Permissions: view-only, no access, and full access | P1 | Automated (API, partial) |
E2E-CUS-001 · Create a customer with consent and find them by search
Priority: P1 · Covers: FR-CUS-01 · Automation: Automated (API, partial)
Preconditions: baseline. Signed in as ADVISOR_A1, active garage A1.
Test data: QA Customer Hoa Pham, phone 0911000020, e-mail [email protected], address 15 Nguyen Hue, Quan 1, TP.HCM, consent ticked.
Steps
- Customers → New customer. Enter the test data, tick “The customer consents to personal data processing (Decree 13/2023)” and save.
- Search
Hoa, then0911000020, thencustomer.hoa. - Open the customer.
Expected results
- The customer is listed with phone, e-mail, 0 vehicles and the badge Consent given.
- Each search finds Hoa Pham (by name, phone and e-mail).
- The detail page shows the data and an empty vehicle list (“No vehicles yet.” or equivalent). Repair history is per vehicle, not per customer (see 06_Repair_Order.md and 05_Quote_Pricing.md) — each vehicle’s own plate, once one exists, links to its history.
- The customer does not appear when A2 is the active garage.
E2E-CUS-002 · Customer field validation
Priority: P2 · Covers: FR-CUS-01 · Automation: Automated (API, partial)
Preconditions: baseline. ADVISOR_A1, A1 active.
Test data:
| Case | Full name | Phone | Expected | |
|---|---|---|---|---|
| a | (empty) | 0911000021 | — | Full name required |
| b | QA Customer Khoa Bui | 0911 000 (7 digits) | — | Phone must have 8–15 digits |
| c | QA Customer Khoa Bui | 0911000021 | khoa@ | E-mail invalid |
| d | QA Customer Khoa Bui | 0911.000.021 | — | Saved; phone stored as digits |
| e | QA Customer Long Ngo | — | — | Saved: phone and e-mail are optional |
Steps
- For each case, New customer with the row’s data and save.
Expected results
- a, b and c are refused; the form shows “Please check the highlighted information.” and marks the field.
- d and e are saved. Searching
0911000021finds Khoa Bui. - Clean-up: delete Khoa Bui and Long Ngo.
E2E-CUS-003 · Customer phone is unique within a garage only
Priority: P2 · Covers: FR-CUS-01 · Automation: Automated (API, partial)
Preconditions: baseline. Signed in as OWNER_A.
Test data: phone 0911000001 (An Nguyen in A1).
Steps
- A1 active → New customer QA Customer An Clone with phone
0911000001. - A2 active → New customer QA Customer An Clone with phone
0911000001.
Expected results
- Step 1 is refused: another customer of this garage uses that phone.
- Step 2 is saved: each garage has its own customers.
- Clean-up: delete An Clone in A2.
E2E-CUS-004 · Edit a customer and withdraw consent
Priority: P2 · Covers: FR-CUS-01, Decree 13/2023 consent · Automation: Automated (API, partial)
Preconditions: baseline. ADVISOR_A1, A1 active.
Steps
- Edit QA Customer An Nguyen: address
20 Pasteur, Quan 3, TP.HCM; untick consent. Save. - Reload the list.
- Edit again and tick consent. Save.
Expected results
- Step 1: “Changes saved.”; the address is updated and the badge reads No consent.
- The change survives the reload.
- Step 3: Consent given again.
E2E-CUS-005 · Register a vehicle for a customer
Priority: P1 · Covers: FR-CUS-02 · Automation: Automated (API, partial)
Preconditions: baseline. ADVISOR_A1, A1 active.
Test data: plate 51A-555.55, make Kia, model Morning, year 2019, VIN KNABE511AKT000001, engine number G4LA0001, owner QA Customer Binh Tran.
Steps
- Vehicles → New vehicle with the test data. Save.
- Open customer Binh Tran.
Expected results
- The vehicle is listed with plate, make, model, year and owner QA Customer Binh Tran.
- Binh Tran now shows 2 vehicles (51B-222.22 and 51A-555.55) on the customer list and detail page.
- A vehicle cannot be saved without an owner.
E2E-CUS-006 · License plates are unique per garage, whatever the formatting
Priority: P2 · Covers: FR-CUS-02 · Automation: Automated (API, partial)
Preconditions: baseline. Signed in as OWNER_A.
Test data: existing plate 51A-111.11 (An Nguyen, A1).
Steps
- A1 active → New vehicle, owner Binh Tran, plate
51a11111. - A1 → plate
51A 111 11. - A2 active → New vehicle, owner Chi Le, plate
51A-111.11.
Expected results
- Steps 1 and 2 are refused: another vehicle already uses this plate. Letter case, spaces, dots and dashes do not make a plate different.
- Step 3 is saved (other garage).
- Clean-up: delete the vehicle created in A2.
E2E-CUS-007 · Vehicle field validation
Priority: P3 · Covers: FR-CUS-02 · Automation: Automated (API, partial)
Preconditions: baseline. ADVISOR_A1, A1 active; owner Binh Tran.
Test data:
| Case | Plate | Year | Expected |
|---|---|---|---|
| a | (empty) | 2020 | Plate required |
| b | 51A (3 characters) | 2020 | Plate must have 4–12 letters or digits |
| c | 51A-666.66 | 1885 | Year out of range |
| d | 51A-666.66 | next year + 1 | Year out of range |
| e | 51A-666.66 | next year | Saved |
Steps
- For each case, New vehicle with the row’s data and save.
Expected results
- a–d are refused with the field highlighted.
- e is saved (model years up to next year are allowed). Clean-up: delete it.
E2E-CUS-008 · Search vehicles
Priority: P2 · Covers: FR-CUS-02 · Automation: Automated (API, partial)
Preconditions: baseline. OWNER_A, A1 active.
Steps
- Vehicles → search
51A-111, then51a111, thenToyota, thenVios, thenFord.
Expected results
51A-111,51a111,ToyotaandViosfind 51A-111.11 Toyota Vios.Fordfinds nothing (no Ford vehicle is in the dataset); the empty state “No vehicles yet.” or an empty result is shown.
E2E-CUS-009 · Delete a vehicle, then a customer with vehicles
Priority: P2 · Covers: FR-CUS-01, FR-CUS-02 · Automation: Automated (API, partial)
Preconditions: baseline. ADVISOR_A1, A1 active. Create QA Customer Minh Dao (0911000030) with vehicles 51A-777.77 and 51A-888.88.
Steps
- Vehicles → delete
51A-888.88and confirm. - Customers → delete QA Customer Minh Dao.
- Search Vehicles for
51A-777. - Create a new vehicle with plate
51A-777.77for Binh Tran.
Expected results
- Step 1 asks “Delete the vehicle 51A-888.88?” and removes it.
- Step 2 asks “Delete QA Customer Minh Dao and 1 vehicles? Quotes and repair history are kept.” and removes both.
- Step 3 finds nothing.
- Step 4 is allowed: a deleted vehicle’s plate can be reused. Clean-up: delete it.
E2E-CUS-010 · Manage suppliers
Priority: P1 · Covers: FR-SUP-01 · Automation: Automated (API, partial)
Preconditions: baseline. OWNER_A, A1 active.
Test data: QA Supplier Dau Nhot Mien Nam, type Supplier, contact Mr. Tuan, phone 0912000003, e-mail [email protected], tax ID 0309876543.
Steps
- Suppliers → New supplier with the test data. Save.
- Search
Dau Nhot. - Edit the new supplier: contact
Ms. Thu. Save. - Delete it and confirm.
Expected results
- The supplier appears with contact and phone.
- The search finds only Dau Nhot Mien Nam.
- The edit is saved.
- Step 4 asks “Delete the supplier QA Supplier Dau Nhot Mien Nam?” and removes it.
- A2 has no suppliers (suppliers belong to one garage).
E2E-CUS-011 · Supplier name is unique per garage
Priority: P3 · Covers: FR-SUP-01 · Automation: Automated (API, partial)
Preconditions: baseline. OWNER_A, A1 active.
Steps
- Suppliers → New supplier
qa supplier phu tung sai gon. Save.
Expected results
- Step 1 is refused: a supplier with that name exists (letter case ignored).
E2E-CUS-012 · Permissions: view-only, no access, and full access
Priority: P1 · Covers: FR-IAM-03, FR-CUS-01, FR-SUP-01 · Automation: Automated (API, partial)
Preconditions: baseline. As OWNER_A, copy the address of customer An Nguyen (/customers/<id>).
Test data: VIEWER_A1 (customers view), TECH_A1A2 (no customer access), ADVISOR_A1 (customers write, suppliers view), MANAGER_A1 (everything).
Steps
- VIEWER_A1, A1 active: open Customers and Vehicles; open An Nguyen.
- TECH_A1A2, A1 active: look at the sidebar; paste An Nguyen’s address; then type
/suppliers. - ADVISOR_A1: open Suppliers.
- MANAGER_A1: add and delete supplier QA Supplier Manager Test.
Expected results
- VIEWER_A1 sees customers and vehicles but no New, edit or delete buttons. Suppliers and Staff are not in the sidebar.
- TECH_A1A2 has no Customers, Vehicles or Suppliers in the sidebar. The pasted address and
/suppliersshow no data; the message is “You are not allowed to do this.” (or the page redirects). - ADVISOR_A1 sees suppliers but cannot add, edit or delete them.
- MANAGER_A1 can add and delete the supplier.