{
  "allowed_variations": [
    "Invoice total may be formatted as currency or plain number.",
    "Save button may read Save, Save draft, or Create invoice.",
    "A duplicate-invoice warning may appear and must route to review."
  ],
  "data_inputs": [
    "vendor_name",
    "invoice_number",
    "invoice_total",
    "due_date",
    "attachment"
  ],
  "goal": "Enter a vendor invoice from an email attachment into the accounting portal and prepare it for manager approval.",
  "owner": "Office Manager",
  "steps": [
    {
      "action": "open",
      "expected": [
        "invoice form visible",
        "vendor field visible"
      ],
      "selectors": [
        "url:/invoices/new",
        "text:New invoice"
      ],
      "target": "accounting portal invoice page"
    },
    {
      "action": "fill",
      "expected": [
        "vendor accepted",
        "vendor suggestion selected"
      ],
      "selectors": [
        "label:Vendor",
        "name:vendor",
        "placeholder:Vendor name"
      ],
      "target": "vendor",
      "value_key": "vendor_name"
    },
    {
      "action": "fill",
      "expected": [
        "invoice number populated"
      ],
      "selectors": [
        "label:Invoice number",
        "name:invoiceNumber"
      ],
      "target": "invoice number",
      "value_key": "invoice_number"
    },
    {
      "action": "fill",
      "expected": [
        "amount accepted",
        "amount normalized"
      ],
      "selectors": [
        "label:Amount",
        "name:amount",
        "aria:Invoice total"
      ],
      "target": "invoice total",
      "value_key": "invoice_total"
    },
    {
      "action": "attach",
      "expected": [
        "attachment uploaded"
      ],
      "selectors": [
        "label:Upload invoice",
        "input[type=file]"
      ],
      "target": "invoice attachment",
      "value_key": "attachment"
    },
    {
      "action": "submit",
      "expected": [
        "draft invoice created",
        "manager approval requested"
      ],
      "requires_approval": true,
      "selectors": [
        "role=button[name='Save draft']",
        "text:Save",
        "text:Create invoice"
      ],
      "target": "save draft"
    }
  ],
  "surface": "browser",
  "task_name": "Weekly vendor invoice entry"
}