E2E SCENARIOS — REPAIR ORDER
VietGara — Release 1.3 · Version 1.0 — September 30, 2026
Covers FR-REP-01, 02, 03 and 06 (the Kanban board, web-only in this release). FR-REP-04 (before/after photos) and FR-REP-05 (real-time customer tracking) are Phase 11, with the Technician App and the Customer App. Records are in 00_Test_Data.md §3.3.
waiting_on_partsstatus (Release 1.3 to 7.2). The Kanban board’s fifth column exists in the data model (RepairOrderStatus.WAITING_ON_PARTS) but nothing in Release 1.3 sets it automatically — there is no live check yet of whether a part line’s part is in stock (the draft stock issue of Release 7.0 reserves the parts but does not move the order; Release 7.3 adds that check). No scenario below exercises reaching that column, since no user action currently produces it; this is a known gap, not something to file as a bug.
| ID | Title | Priority | Automation |
|---|---|---|---|
| E2E-REP-001 | Create an ad-hoc repair order | P1 | Automated (API, partial) |
| E2E-REP-002 | Ad-hoc repair order field validation | P2 | Automated (API, partial) |
| E2E-REP-003 | A repair order created from an approved quote inherits its data | P1 | Automated |
| E2E-REP-004 | The Kanban board’s columns reflect status derived from line progress | P1 | Automated (API, partial) |
| E2E-REP-005 | Assign one or more technicians to a line | P1 | Automated (API, partial) |
| E2E-REP-006 | Update a line’s own progress; the order’s overall status is derived | P1 | Automated |
| E2E-REP-007 | Filter the board by technician | P2 | Automated (API, partial) |
| E2E-REP-008 | Closing requires every line to be completed | P1 | Automated (API, partial) |
| E2E-REP-009 | A closed repair order cannot be edited further | P2 | Automated (API, partial) |
| E2E-REP-010 | The repair order joins the vehicle’s repair history | P2 | Automated (API, partial) |
| E2E-REP-011 | Repair order number is rendered from the garage’s template | P3 | Automated (API, partial) |
| E2E-REP-012 | Permissions: no access, view-only, and full access | P1 | Automated |
| E2E-REP-013 | Add, edit and remove lines of an open repair order | P1 | Automated |
| E2E-REP-014 | The draft stock issue follows the part lines; a posted issue freezes the parts | P1 | Automated |
| E2E-REP-015 | Cancel a repair order before work starts: the reservation is released | P1 | Automated |
| E2E-REP-016 | A repair order lacking stock waits on parts, and comes back when stock arrives | P1 | Automated |
| E2E-REP-017 | A hidden consumable on the order is deducted, not billed, not printed, and does not hold the order back | P1 | Automated (API) |
| E2E-REP-018 | Permissions for line changes and cancellation | P1 | Automated (API) |
E2E-REP-001 · Create an ad-hoc repair order
Priority: P1 · Covers: FR-REP-01 · Automation: Automated (API, partial)
Preconditions: baseline. Signed in as ADVISOR_A1, active garage A1.
Test data: vehicle 51B-222.22 (Binh Tran). Lines: (1) Labor “Brake inspection”, qty 1, unit price 150000; (2) Part “Brake pad set”, qty 1, unit price 450000 (no part picked).
Steps
- Repair orders → New repair order. Pick the vehicle (no customer step — the vehicle alone identifies the job).
- Add line item twice and fill in the test data.
- Save.
Expected results
- The repair order is created, numbered
LSC-<YYYY><MM>-####, status To Do, customer name and plate shown even though only the vehicle was picked. - The total is the sum of the two lines (
600,000 VND). - It appears in the To Do column of the Kanban board.
E2E-REP-002 · Ad-hoc repair order field validation
Priority: P2 · Covers: FR-REP-01 · Automation: Automated (API, partial)
Preconditions: baseline. ADVISOR_A1, A1 active. Vehicle 51B-222.22.
Steps
- New repair order, pick the vehicle, remove the only line, try Create.
- Add a line with an empty description; try Create.
- Add a line with quantity
0; try Create.
Expected results
- Step 1: Create is disabled (needs at least one line).
- Steps 2–3 are refused: “Please check the highlighted information.”
E2E-REP-003 · A repair order created from an approved quote inherits its data
Priority: P1 · Covers: FR-QUO-04, FR-REP-01 · Automation: Automated
Preconditions: an approved quote converted (E2E-QUO-010), or convert a fresh approved quote for this scenario.
Steps
- Open the new repair order from the conversion banner.
Expected results
quoteIdlinks back to the source quote (not shown directly in the UI, but the vehicle history entry for the repair order and the quote both reference the same job).- Customer name and vehicle plate match the quote’s; lines match only the quote’s approved lines, each starting at line status Not started with no technician assigned.
- Status is To Do; it appears on the Kanban board alongside ad-hoc orders, with no visible difference in this release.
E2E-REP-004 · The Kanban board’s columns reflect status derived from line progress
Priority: P1 · Covers: FR-REP-03 · Automation: Automated (API, partial)
Preconditions: baseline. ADVISOR_A1 or TECH_A1A2, A1 active. A repair order with 2 lines (E2E-REP-001’s, or a fresh one), both Not started.
Steps
- Look at the board: note the order’s column.
- Open the order → set line 1 to In progress. Save. Return to the board.
- Set line 1 to Completed, line 2 to In progress. Return to the board.
- Set both lines to Completed. Return to the board.
Expected results
- Step 1: To Do (every line Not started).
- Step 2: In Progress (at least one line started, not all completed).
- Step 3: still In Progress.
- Step 4: Completed (every line completed) — the card moves with no drag needed; there is no way to drag a card directly between columns, only to edit its lines (UI Design Spec 3.3).
E2E-REP-005 · Assign one or more technicians to a line
Priority: P1 · Covers: FR-REP-02 · Automation: Automated (API, partial)
Preconditions: baseline. ADVISOR_A1, A1 active. A repair order with a line not yet assigned. TECH_A1A2 and MANAGER_A1 are both staff of A1.
Steps
- Open the order → on one line, check both TECH_A1A2 and MANAGER_A1 in the technician list. Save.
- Uncheck MANAGER_A1. Save.
Expected results
- Step 1 saves both names against the line (read-only view lists “QA Technician A1-A2, QA Manager A1”).
- Step 2 saves with only TECH_A1A2 remaining. A line may have zero, one or several technicians.
E2E-REP-006 · Update a line’s own progress; the order’s overall status is derived
Priority: P1 · Covers: FR-REP-03 · Automation: Automated
Preconditions: baseline. Signed in as TECH_A1A2 (assigned to the line from E2E-REP-005), A1 active.
Steps
- Open the repair order → change the assigned line’s status Not started → In progress → Completed, saving after each change.
Expected results
- Each save updates only that line; other lines are untouched.
- The technician checkboxes for that line are unaffected by a status-only save (status and technicians are edited and saved together from the same row, but changing one does not silently clear the other).
E2E-REP-007 · Filter the board by technician
Priority: P2 · Covers: FR-REP-02 · Automation: Automated (API, partial)
Preconditions: baseline. ADVISOR_A1, A1 active. At least one repair order with a line assigned to TECH_A1A2, and one with no technician assigned.
Steps
- Repair orders → filter Technician = QA Technician A1-A2.
- Clear the filter.
Expected results
- Filtered: only orders with a line assigned to TECH_A1A2 appear, across every column.
- Cleared: every order of A1 reappears.
E2E-REP-008 · Closing requires every line to be completed
Priority: P1 · Covers: FR-REP-06 · Automation: Automated (API, partial)
Preconditions: baseline. ADVISOR_A1, A1 active. A repair order with 2 lines, one Completed and one In progress.
Steps
- Open the order: look at the Close repair order button.
- Complete the second line. Save.
- Close repair order.
Expected results
- Step 1: the button is disabled with the hint “Complete every line before closing.”
- Step 2: the order’s status becomes Completed; the hint changes to “Every line is completed — ready to close.”
- Step 3: the order’s status becomes Closed,
closedAtis set, and it drops off the Kanban board (Closed is not one of its four columns).
E2E-REP-009 · A closed repair order cannot be edited further
Priority: P2 · Covers: FR-REP-06 · Automation: Automated (API, partial)
Preconditions: a Closed repair order (E2E-REP-008).
Steps
- Open it: look for line-status controls, technician checkboxes and the close action.
- Try closing it again (e.g. by replaying the request).
Expected results
- The lines are shown read-only (status text and assigned technicians only, no controls); there is no close action.
- Step 2 is refused: “This repair order is already closed.”
E2E-REP-010 · The repair order joins the vehicle’s repair history
Priority: P2 · Covers: FR-CUS-03 · Automation: Automated (API, partial)
Preconditions: baseline. A repair order for Binh Tran’s vehicle 51B-222.22 (E2E-REP-001).
Steps
- Open vehicle
51B-222.22→ Repair history.
Expected results
- The repair order is listed with its number, type Repair order, status and total, alongside any quotes for the same vehicle, newest first.
- Following it opens the repair order detail page.
E2E-REP-011 · Repair order number is rendered from the garage’s template
Priority: P3 · Covers: FR-TEN-05 · Automation: Automated (API, partial)
Preconditions: baseline. OWNER_A.
Steps
- A1 active → create 2 ad-hoc repair orders; note their numbers.
- A2 active → create 1; note its number.
Expected results
- A1’s are numbered
LSC-<YYYY><MM>-####with consecutive sequences; A2’s starts its own sequence — each garage counts independently, the same as quote numbering (E2E-QUO-011), and independently of the quote sequence within the same garage.
E2E-REP-012 · Permissions: no access, view-only, and full access
Priority: P1 · Covers: FR-IAM-03, FR-REP-02, FR-REP-03, FR-REP-06 · Automation: Automated
Preconditions: baseline. A1 active. A repair order with an incomplete line. OWNER_A invites FREELANCER to A1 with the default group Inventory Staff (view repair orders, no write) — clean-up: remove FREELANCER from A1 after the scenario.
Test data: VIEWER_A1 (no repair-order access at all, per the custom QA Customer Viewer role), FREELANCER as Inventory Staff of A1 (repair-order view only), TECH_A1A2 (repair-order read/write), MANAGER_A1 (everything).
Steps
- VIEWER_A1: look at the sidebar; type
/repair-ordersdirectly. - FREELANCER: open Repair orders, open the order with the incomplete line.
- TECH_A1A2: update a line’s status and close the order once ready.
- MANAGER_A1: same as step 3, on a different order.
Expected results
- VIEWER_A1 has no Repair orders entry in the sidebar;
/repair-ordersshows no data or “You are not allowed to do this.” - FREELANCER sees the board and can open an order, but its line controls (status, technicians) and the close action are not shown or are disabled.
- TECH_A1A2 and MANAGER_A1 can fully manage repair orders, including closing.
E2E-REP-013 · Add, edit and remove lines of an open repair order
Priority: P1 · Covers: FR-REP-07 · Automation: Automated
Blackbox: TestRepairOrderLinesAddEditRemove (a labor line and a part line are added; description, price, part, quantity and packaging unit are edited; a line is removed and the rest renumbered; the total and the status follow; the last line, a hidden-only order, a closed or cancelled order, a full order and an invalid line are refused; a quantity alone on a packaged line is refused).
Preconditions: baseline. ADVISOR_A1, A1 active. An open repair order with one labor line Oil change at 250,000.
Steps
- Open the order → Add line: labor
Wash×1at50,000; then a part lineOIL-5W30×4. - Edit the
Washline: descriptionFull wash, price80,000. - Edit the oil line’s quantity to
5; then change it to1Jug (a 5 L packaging unit). - Remove the
Full washline. - Try to remove the other lines one by one until one is left, and then the last one.
- Complete every line, close the order, and try to add or edit a line.
Expected results
- Step 1: the lines appear after the first and the total is
250,000 + 50,000 + 4 × the oil price. - Step 2: the line total is
80,000; the order’s total follows. - Step 3: the oil line reads
5 L, then1 Jug(= 5 L); sending only a quantity for the line in jugs is refused (“The amount of a line in a packaging unit is entered_quantity.”). - Step 4: the line is gone and the rest are renumbered with no gap.
- Step 5: the last line cannot be removed (“A repair order needs at least one line.”).
- Step 6: closed orders refuse every change.
E2E-REP-014 · The draft stock issue follows the part lines; a posted issue freezes the parts
Priority: P1 · Covers: FR-REP-07, FR-INV-15, FR-INV-20 · Automation: Automated
Blackbox: TestStockIssueFollowsTheLines (the reservation grows, shrinks and moves with the lines; a removed part line frees its reservation; after “Issue now” a part line cannot be added, changed or removed (STOCK_ISSUE_POSTED) while a labor line and a price can; an order edited before its issue existed gets one).
Preconditions: baseline. ADVISOR_A1 and INVENTORY_A1, A1 active. OIL-5W30 with 20 L on hand and FLT-OIL-01 with 5 on hand; an open order with the oil line × 4.
Steps
- INVENTORY_A1: read Stock on Hand (reserved
4 L). - ADVISOR_A1: change the oil line to
6; addFLT-OIL-01×1. - Read Stock on Hand and the order’s Stock issue card.
- Remove the filter line; read again.
- INVENTORY_A1: Issue now. Then ADVISOR_A1: change the oil quantity, add a part line, remove the oil line; then change the labor price.
Expected results
- Step 2/3: reserved becomes
6 Land1; the stock issue lists both lines. - Step 4: the filter is reserved no more.
- Step 5: the three part changes are refused (“The stock issue is already posted, so the parts can no longer change.”); the labor price change is saved.
E2E-REP-015 · Cancel a repair order before work starts: the reservation is released
Priority: P1 · Covers: FR-REP-08, FR-INV-15 · Automation: Automated
Blackbox: TestCancelRepairOrder (an open order is cancelled, its stock issue is cancelled and the reservation released; the order is read-only and cannot be closed or cancelled again; the quote stays converted and cannot be converted again; an order in progress, completed, closed, or with a posted stock issue cannot be cancelled; a waiting order can).
Preconditions: baseline. ADVISOR_A1, A1 active. An approved quote converted into a repair order with OIL-5W30 × 4 (reserved 4 L); a second open order for the same vehicle; a third whose first line is In progress.
Steps
- Open the first order → Cancel repair order. Confirm.
- Check Stock on Hand, the order’s Stock issue card, the vehicle’s history and the quote.
- Try to edit a line, close the order and cancel it again.
- Try to convert the quote again.
- Open the third order (work started) and the closed one: look for Cancel repair order; try it through the API.
Expected results
- Step 1/2: the order shows Cancelled; the stock issue shows Cancelled;
OIL-5W30reserved falls by4 L; the vehicle’s history lists the cancelled order; the quote stays Converted. - Step 3: each is refused; the order is read-only.
- Step 4: refused (already converted); the customer needs a new quote.
- Step 5: the button is not offered; the API refuses with “Only a repair order whose work has not started can be cancelled.”
E2E-REP-016 · A repair order lacking stock waits on parts, and comes back when stock arrives
Priority: P1 · Covers: FR-INV-15 · Automation: Automated
Blackbox: TestWaitingOnParts (an order whose draft issue the stock cannot cover is WAITING_ON_PARTS and the issue shows how much is short; orders are served first come, first served; a receipt brings the waiting order back by itself; cancelling the first order covers the second; a started order that is short shows waiting too; a finished one does not; an order edited to a quantity the stock covers comes back).
Preconditions: baseline. ADVISOR_A1, INVENTORY_A1, A1 active. OIL-5W30 with 5 L on hand and nothing reserved.
Steps
- ADVISOR_A1: create order A with the oil ×
4, then order B with the oil ×4. - Open the board and each order’s Stock issue card.
- INVENTORY_A1: receive
10 LofOIL-5W30(complete the goods receipt). - Create order C with the oil ×
20; look at the board. Cancel order A; look again. - Edit C down to
4. - Start work on B (first line In progress); receive nothing; make the stock short again by a write-off; look at the board.
Expected results
- Step 2: A is Open; B is Waiting on parts and its stock issue reads “Short by 3 L” (5 on hand, 4 held by A).
- Step 3: B returns to Open by itself, and its issue is no longer short.
- Step 4: C is Waiting on parts (“Short by …”); cancelling A frees its
4 Land brings the next waiting order back as far as the stock goes. - Step 5: C returns to Open once the stock covers it.
- Step 6: B, started and short, shows Waiting on parts on the board; a started order whose lines are all completed is Completed.
E2E-REP-017 · A hidden consumable on the order is deducted, not billed, not printed, and does not hold the order back
Priority: P1 · Covers: FR-CAT-08, FR-INV-02 · Automation: Automated (API)
Blackbox: TestHiddenConsumableOnTheOrder (the order created from the quote carries the consumable; it is reserved and deducted at closing at its cost; the order closes with its billable lines completed; the order’s total, the PDF and the settlement leave it out; it can be added directly to an order and is priced 0).
Preconditions: baseline. ADVISOR_A1, A1 active. FLT-OIL-01 with 5 on hand at average cost 40,000. A converted order from the job Oil change (E2E-QUO-017) with a labor line, an oil line and the hidden filter line.
Steps
- Read Stock on Hand for
FLT-OIL-01and the order’s Stock issue. - Complete the billable lines only. Close the order.
- Read Stock Movements and open the order’s PDF and its settlement.
Expected results
- Step 1:
FLT-OIL-01is reserved1; the stock issue lists the filter. - Step 2: the order can be closed although the hidden line was never completed; the order’s total did not change.
- Step 3: one Out movement of
1for the filter at40,000; the PDF and the settlement list the billable lines and the total without the filter.
E2E-REP-018 · Permissions for line changes and cancellation
Priority: P1 · Covers: FR-REP-07, FR-REP-08, FR-IAM-03 · Automation: Automated (API)
Blackbox: TestRepairOrderLinePermissions (read-only access sees the lines but cannot add, edit, remove or cancel; write access can; no access is refused; another garage’s order is not found).
Preconditions: baseline. OWNER_A, A1 active. A role QA Order Reader with only Repair order → View; an open order in A1.
Steps
- Assign the Reader role to a member and sign in as them. Open the order; try to add, edit and remove a line and to cancel the order.
- Sign in as ADVISOR_A1 and do the same.
- Ask for the order through garage A2’s address.
Expected results
- Step 1: the order and its lines are visible; the controls are not offered and the API refuses each change (403).
- Step 2: each change works.
- Step 3: not found.
- Clean-up: delete the role.