Work Orders — Test Cases
Manual acceptance test cases for the work order flows. See Work Order Lifecycle concept, Permissions Model, and the work order guides for context.
TC-WO-001 — Create an unassigned work order from scratch
Verifies: Create a Work Order
Preconditions:
- Logged in as Office (with
work_orders.create). - A test customer and a unit exist.
Steps:
- Navigate to Work Orders -> Add Work Order.
- Pick the customer.
- Pick the unit.
- Pick
Type:Repair. - Add a single line item.
- Leave
Technicianempty. - Save.
Expected:
- Work order is created with status
unassigned. - It appears in the dispatch queue.
- The unit's service history now lists this work order.
TC-WO-002 — Assign a tech moves status to pending
Verifies: Assign a Work Order
Preconditions:
- The unassigned work order from TC-WO-001 exists.
- A tech user exists.
Steps:
- Open the work order.
- Pick the tech in
Technician. - Save.
Expected:
- Status moves to
pending. - A status history row records the transition with the office user and timestamp.
- The tech's queue now shows this work order.
TC-WO-003 — Tech starts the work order (pending -> ongoing)
Verifies: Start a Work Order, Work Order Lifecycle
Preconditions:
- The work order from TC-WO-002 exists with status
pending. - Logged in as the assigned tech.
Steps:
- Open the work order.
- Select the Start Work Order action.
Expected:
- Status moves to
ongoing. - A status history row records the tech as the actor and timestamp.
TC-WO-004 — Tech pauses and resumes a work order
Verifies: Work Order Lifecycle
Preconditions:
- Work order from TC-WO-003 is
ongoing.
Steps:
- As the tech, select Pause Work Order.
- Add a pause reason:
Test — waiting on parts. - Confirm.
- After 10 seconds, select Start Work Order again to resume.
Expected:
- After step 3, status is
paused. Status history records the pause with the reason. - After step 4, status is
ongoing. A second status history row records the resume.
TC-WO-005 — Tech cannot cancel a work order
Verifies: Permissions Model, Work Order Lifecycle
Preconditions:
- Work order is
ongoingand assigned to a tech withoutwork_orders.supervise.
Steps:
- As the tech, look for a Cancel action on the work order detail page.
- If hidden, attempt a direct POST to the cancel endpoint.
Expected:
- The Cancel action is not visible to the tech.
- A direct POST returns 403 (or a redirect with a danger flash).
- The work order status remains
ongoing.
TC-WO-006 — Tech submits work for approval (ongoing -> waiting_approval)
Verifies: Submit a Work Order
Preconditions:
- Work order from TC-WO-004 is
ongoing. - The tech has uploaded any required photos and added used parts.
Steps:
- As the tech, select Complete Work Order (which submits for office review).
- Confirm.
Expected:
- Status moves to
waiting_approval. - The work order disappears from the active tech queue.
- It appears in the office's "needs review" queue.
TC-WO-007 — Office approves the submission (waiting_approval -> completed)
Verifies: Approve a Work Order
Preconditions:
- Work order from TC-WO-006 is
waiting_approval. - Logged in as Office with
work_orders.supervise.
Steps:
- Open the work order.
- Review submitted items, photos, customer signature.
- Select Approve & Complete.
Expected:
- Status moves to
completed. - Status history records the approver.
- If invoices feature is on, a "Create Invoice" action appears.
TC-WO-008 — Office sends submission back (waiting_approval -> ongoing)
Verifies: Approve a Work Order, Work Order Lifecycle
Preconditions:
- A work order is
waiting_approval. - Logged in as Office with
work_orders.supervise.
Steps:
- Open the work order.
- Select the Reject / Send Back action (returns to ongoing).
- Add reason:
Test — missing photos for line item 3.
Expected:
- Status returns to
ongoing. - The reason is logged in status history.
- The work order reappears in the tech's active queue.
TC-WO-009 — Status history is immutable
Verifies: Work Order Lifecycle
Preconditions:
- A work order has gone through several status transitions.
Steps:
- Open the work order's status history view.
- Look for any edit or delete action on individual rows.
- Try to alter a row directly via the database (intended only for engineering verification, skip if not applicable).
Expected:
- No edit or delete UI exists for status history rows.
- Each row is timestamped and shows the actor.
- The order is monotonic.
TC-WO-010 — Office manually marks a completed work order as billed
Verifies: Work Order Lifecycle
Preconditions:
- A
completedwork order exists. - Logged in as Office with
work_orders.supervise(the only role allowed to transitioncompleted -> billed).
Steps:
- Open the completed work order.
- In the Status card, select Mark as Billed.
Expected:
- Status moves to
billed. - A status history row is logged with the supervisor as actor.
- The Status card no longer offers any transitions —
billedis terminal. - (If the work order had an invoice, that invoice is unchanged. The invoice and the work-order status are independent — see Invoices concept.)