Automation lab Aú E2E Workflows (E2E_WORKFLOWS)

Lab 107: Login -> Buy -> Cancel order (rule-based) -> Verify restock -> Verify history

Cancel orders under rules and verify stock restoration and order history.

advanced advanced
advanced

Objectives

Use for test scripts
  • Validate cancellation rules by status.
  • Confirm stock restoration after cancellation.
  • Verify order history and status changes.
  • Handle idempotency and concurrent updates.

Sandbox

E2E Workflows | e2e-workflows | advanced | active

Login -> Buy -> Cancel order (rule-based) -> Verify restock -> Verify history

Cancel orders under defined rules, verify restock, and confirm history updates.

Cancellation rules Inventory restock Order history

Learning objectives

  • Validate cancellation rules by status.
  • Confirm stock restoration after cancellation.
  • Verify order history and status changes.
  • Handle idempotency and concurrent updates.

Steps

  1. Login as buyer USER_07 and place an order.
  2. Verify order status is PLACED or CONFIRMED.
  3. Cancel the order with a reason.
  4. Verify status becomes CANCELLED and stock is restored.
  5. Check order history for CANCELLED status.

Expected results

  • Cancel action is available only for allowed statuses.
  • Cancel requires a reason.
  • After cancellation, order status is CANCELLED.
  • Product stock is restored correctly.
  • Order history reflects the cancelled order.

Practice sandbox

Buyer places an order and cancels; admin can change status.

Live

Active user

Not signed in.

Guest

Product P009

Stock: 5

0 items

Order detail

-

Order code: -

Admin status control

Allowed: SHIPPED, DELIVERED

Order history

0 orders
Order Qty Status
Ready.

Assertions to practice

  • Cancel requires a reason and allowed status.
  • Stock increases by the cancelled quantity once.
  • History shows CANCELLED after cancellation.