[
  {
    "actions": [
      {
        "action": "navigate",
        "type": "navigate",
        "url": "{base_url}/purchase-orders"
      },
      {
        "action": "wait_for",
        "selector": "input[placeholder=\"Search PO, supplier or project...\"]",
        "timeout_ms": 30000,
        "type": "wait_for_selector"
      },
      {
        "action": "click",
        "selector": "[data-testid=\"po-filter-pending-approval\"]",
        "type": "click"
      },
      {
        "action": "wait_for",
        "selector": "tr:has-text(\"Pending Approval\")",
        "timeout_ms": 30000,
        "type": "wait_for_selector"
      },
      {
        "text": "Pending Approval",
        "type": "assert_text"
      },
      {
        "text": "Purchase Orders",
        "type": "assert_text"
      }
    ],
    "capture_each_step": true,
    "expected_result": "After creating a PO whose total exceeds the \u00a35,000 approval limit, the PO appears in the Pending Approval list (not Requested) and is approvable from the same Pending Approval surface \u2014 the Telegram Approve / Reject buttons resolve against the same status.",
    "human_journey": true,
    "name": "purchase-order-over-limit-auto-submits-for-approval",
    "path": "/purchase-orders",
    "selectors": [],
    "source": "proof_contract",
    "start_path": "/",
    "texts": [
      "Purchase Orders"
    ]
  },
  {
    "actions": [
      {
        "action": "navigate",
        "type": "navigate",
        "url": "{base_url}/"
      },
      {
        "action": "wait_for",
        "selector": "a[href=\"/purchase-orders\"]",
        "timeout_ms": 30000,
        "type": "wait_for_selector"
      },
      {
        "action": "click",
        "selector": "a[href=\"/purchase-orders\"]",
        "type": "click"
      },
      {
        "action": "wait_for",
        "selector": "input[placeholder=\"Search PO, supplier or project...\"]",
        "timeout_ms": 30000,
        "type": "wait_for_selector"
      },
      {
        "action": "fill",
        "selector": "input[placeholder=\"Search PO, supplier or project...\"]",
        "type": "fill",
        "value": "PO25-10048"
      },
      {
        "action": "wait_for",
        "selector": "tr[data-testid^=\"po-row-\"][data-po-status=\"Requested\"]:has-text(\"PO25-10048\")",
        "timeout_ms": 15000,
        "type": "wait_for_selector"
      },
      {
        "action": "click",
        "selector": "[data-testid=\"po-filter-pending-approval\"]",
        "type": "click"
      },
      {
        "action": "wait_for",
        "selector": "tr[data-testid^=\"po-row-\"][data-po-status]",
        "timeout_ms": 15000,
        "type": "wait_for_selector"
      },
      {
        "text": "Awaiting Approval",
        "type": "assert_text"
      },
      {
        "text": "Purchase Orders",
        "type": "assert_text"
      }
    ],
    "capture_each_step": true,
    "expected_result": "PO25-10048 is present on /purchase-orders in Requested status (proves the user data state matches the screenshot). When the Pending Approval filter is active, the page contains no rows where data-po-status=\"Requested\" \u2014 these are the rows that the PO approval reminder service will now exclude from the Telegram digest after the fix. The reminder service change (backend/services/po_approval_reminder.py line 103) is proven by code diff; the data-state check here proves the user-visible row state is consistent with the new filter.",
    "human_journey": true,
    "name": "po-telegram-digest-excludes-requested-2026-06-16",
    "path": "/purchase-orders",
    "selectors": [],
    "source": "proof_contract",
    "start_path": "/",
    "texts": [
      "Purchase Orders"
    ]
  }
]