Skip to main content

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:

  1. Navigate to Work Orders -> Add Work Order.
  2. Pick the customer.
  3. Pick the unit.
  4. Pick Type: Repair.
  5. Add a single line item.
  6. Leave Technician empty.
  7. 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:

  1. Open the work order.
  2. Pick the tech in Technician.
  3. 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:

  1. Open the work order.
  2. 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:

Steps:

  1. As the tech, select Pause Work Order.
  2. Add a pause reason: Test — waiting on parts.
  3. Confirm.
  4. 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 ongoing and assigned to a tech without work_orders.supervise.

Steps:

  1. As the tech, look for a Cancel action on the work order detail page.
  2. 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:

  1. As the tech, select Complete Work Order (which submits for office review).
  2. 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:

  1. Open the work order.
  2. Review submitted items, photos, customer signature.
  3. 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:

  1. Open the work order.
  2. Select the Reject / Send Back action (returns to ongoing).
  3. 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:

  1. Open the work order's status history view.
  2. Look for any edit or delete action on individual rows.
  3. 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 completed work order exists.
  • Logged in as Office with work_orders.supervise (the only role allowed to transition completed -> billed).

Steps:

  1. Open the completed work order.
  2. 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 — billed is terminal.
  • (If the work order had an invoice, that invoice is unchanged. The invoice and the work-order status are independent — see Invoices concept.)