Docs/Steps

Mock Route

mock-route intercepts a network request and returns a canned response. Use it to isolate the UI from a flaky or unbuilt backend, or to drive edge-case responses that are hard to reproduce in a real environment.

yaml
- mock-route:
    url: /api/invoices
    method: GET
    status: 200
    body:
      invoices:
        - id: 1
          total: 42.00
          status: paid

The mock stays in effect until remove-mock-route is called or the test ends.