Skip to content

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.

IDTitlePriorityAutomation
E2E-CUS-001Create a customer with consent and find them by searchP1Automated (API, partial)
E2E-CUS-002Customer field validationP2Automated (API, partial)
E2E-CUS-003Customer phone is unique within a garage onlyP2Automated (API, partial)
E2E-CUS-004Edit a customer and withdraw consentP2Automated (API, partial)
E2E-CUS-005Register a vehicle for a customerP1Automated (API, partial)
E2E-CUS-006License plates are unique per garage, whatever the formattingP2Automated (API, partial)
E2E-CUS-007Vehicle field validationP3Automated (API, partial)
E2E-CUS-008Search vehiclesP2Automated (API, partial)
E2E-CUS-009Delete a vehicle, then a customer with vehiclesP2Automated (API, partial)
E2E-CUS-010Manage suppliersP1Automated (API, partial)
E2E-CUS-011Supplier name is unique per garageP3Automated (API, partial)
E2E-CUS-012Permissions: view-only, no access, and full accessP1Automated (API, partial)

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

  1. Customers → New customer. Enter the test data, tick “The customer consents to personal data processing (Decree 13/2023)” and save.
  2. Search Hoa, then 0911000020, then customer.hoa.
  3. 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:

CaseFull namePhoneE-mailExpected
a(empty)0911000021—Full name required
bQA Customer Khoa Bui0911 000 (7 digits)—Phone must have 8–15 digits
cQA Customer Khoa Bui0911000021khoa@E-mail invalid
dQA Customer Khoa Bui0911.000.021—Saved; phone stored as digits
eQA Customer Long Ngo——Saved: phone and e-mail are optional

Steps

  1. 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 0911000021 finds 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

  1. A1 active → New customer QA Customer An Clone with phone 0911000001.
  2. 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.

Priority: P2 · Covers: FR-CUS-01, Decree 13/2023 consent · Automation: Automated (API, partial)

Preconditions: baseline. ADVISOR_A1, A1 active.

Steps

  1. Edit QA Customer An Nguyen: address 20 Pasteur, Quan 3, TP.HCM; untick consent. Save.
  2. Reload the list.
  3. 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

  1. Vehicles → New vehicle with the test data. Save.
  2. 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

  1. A1 active → New vehicle, owner Binh Tran, plate 51a11111.
  2. A1 → plate 51A 111 11.
  3. 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:

CasePlateYearExpected
a(empty)2020Plate required
b51A (3 characters)2020Plate must have 4–12 letters or digits
c51A-666.661885Year out of range
d51A-666.66next year + 1Year out of range
e51A-666.66next yearSaved

Steps

  1. 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

  1. Vehicles → search 51A-111, then 51a111, then Toyota, then Vios, then Ford.

Expected results

  • 51A-111, 51a111, Toyota and Vios find 51A-111.11 Toyota Vios.
  • Ford finds 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

  1. Vehicles → delete 51A-888.88 and confirm.
  2. Customers → delete QA Customer Minh Dao.
  3. Search Vehicles for 51A-777.
  4. Create a new vehicle with plate 51A-777.77 for 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

  1. Suppliers → New supplier with the test data. Save.
  2. Search Dau Nhot.
  3. Edit the new supplier: contact Ms. Thu. Save.
  4. 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

  1. 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

  1. VIEWER_A1, A1 active: open Customers and Vehicles; open An Nguyen.
  2. TECH_A1A2, A1 active: look at the sidebar; paste An Nguyen’s address; then type /suppliers.
  3. ADVISOR_A1: open Suppliers.
  4. 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 /suppliers show 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.