{
  "brief": "Build a stock tracker called Shelf Stock for a small hardware shop. Start with Wood screws at 10 and Cable ties at 14. Give each item buttons to record one sale and restock one unit. Show “Low stock” for that item only when its count is below 10. Keep counts between page reloads. Make it usable on a phone.",
  "app": "Shelf Stock",
  "requirements": [
    {
      "id": "wood-screws-sell-low-stock",
      "text": "Selling one Wood screws from 10 should change the count to 9 and show Low stock for Wood screws only.",
      "steps": [
        {
          "action": "click",
          "selector": "#sell-wood-screws",
          "value": ""
        },
        {
          "action": "expectText",
          "selector": "#count-wood-screws",
          "value": "9"
        },
        {
          "action": "expectText",
          "selector": "#status-wood-screws",
          "value": "Low stock"
        },
        {
          "action": "expectText",
          "selector": "#count-cable-ties",
          "value": "14"
        },
        {
          "action": "expectText",
          "selector": "#status-cable-ties",
          "value": ""
        },
        {
          "action": "expectState",
          "selector": "/items/woodScrews",
          "value": "9"
        }
      ]
    },
    {
      "id": "wood-screws-restock-clears-warning",
      "text": "Restocking Wood screws from 9 to 10 should remove the Low stock warning.",
      "steps": [
        {
          "action": "click",
          "selector": "#sell-wood-screws",
          "value": ""
        },
        {
          "action": "click",
          "selector": "#restock-wood-screws",
          "value": ""
        },
        {
          "action": "expectText",
          "selector": "#count-wood-screws",
          "value": "10"
        },
        {
          "action": "expectText",
          "selector": "#status-wood-screws",
          "value": ""
        },
        {
          "action": "expectState",
          "selector": "/items/woodScrews",
          "value": "10"
        }
      ]
    },
    {
      "id": "wood-screws-does-not-change-cable-ties",
      "text": "Selling Wood screws should not change the Cable ties count.",
      "steps": [
        {
          "action": "click",
          "selector": "#sell-wood-screws",
          "value": ""
        },
        {
          "action": "expectText",
          "selector": "#count-wood-screws",
          "value": "9"
        },
        {
          "action": "expectText",
          "selector": "#count-cable-ties",
          "value": "14"
        },
        {
          "action": "expectState",
          "selector": "/items/cableTies",
          "value": "14"
        }
      ]
    },
    {
      "id": "counts-start-with-defaults",
      "text": "The tracker should start with Wood screws at 10 and Cable ties at 14.",
      "steps": [
        {
          "action": "expectText",
          "selector": "#count-wood-screws",
          "value": "10"
        },
        {
          "action": "expectText",
          "selector": "#count-cable-ties",
          "value": "14"
        },
        {
          "action": "expectText",
          "selector": "#status-wood-screws",
          "value": ""
        },
        {
          "action": "expectText",
          "selector": "#status-cable-ties",
          "value": ""
        }
      ]
    }
  ],
  "report": {
    "results": [
      {
        "id": "wood-screws-sell-low-stock",
        "status": "passed",
        "error": ""
      },
      {
        "id": "wood-screws-restock-clears-warning",
        "status": "passed",
        "error": ""
      },
      {
        "id": "wood-screws-does-not-change-cable-ties",
        "status": "passed",
        "error": ""
      },
      {
        "id": "counts-start-with-defaults",
        "status": "passed",
        "error": ""
      }
    ],
    "runtimeError": "",
    "cancelled": false
  },
  "verifiedAt": "2026-11-16T19:32:54.467Z"
}
