Superapp / Product requirements / flow
Flow benchmark fixture — product requirements
Flow benchmark is a one-page fixture: a heading, a status line and a single Name field with a Save button. Saving shows the saved name in the status line; a small API mirrors the page.
Problem. Testers and automation runners need a minimal, fully predictable page against which every message and rule can be checked exactly.
Users
- Tester — Verify page text, validation and keyboard behaviour against exact wording.
- Automation runner — Read the page faithfully and report disagreement between an expectation and what is shown.
Goals
- The page shows exactly the wording specified here.
- Validation rules are identical on the page and in the API.
Out of scope
- Persistence across browsers
- Styling
Contents
Page content
Heading, status line and form shown on load.
FR-PAG-01
MustThe page at /flow/ shows the heading "Flow benchmark", a status line reading "Ready" and a form with one text field labelled "Name" and a "Save" button.
- The status line always starts as "Ready"; it never reads "Offline" or any other wording on load
- The Name field is empty on load
FR-PAG-02
ShouldThe status is not persisted: reloading the page resets it to "Ready" and empties the Name field.
Save and validation
Saving a name and rejecting empty input.
FR-SAV-01
MustSaving a name replaces the status with "Saved: <name>".
- "Ada" shows "Saved: Ada"; the wording is "Saved", not "Stored"
FR-SAV-02
MustAn empty name is rejected with "Name is required" in the status line, before any request is made.
FR-SAV-03
ShouldThe name is trimmed before validation and saving.
- Only spaces: "Name is required"
- " Grace " is saved as "Saved: Grace"
FR-SAV-04
ShouldEach successful save replaces the previous one; only the latest name is shown.
- Saving "Ada" then "Alan" shows "Saved: Alan"
FR-SAV-05
ShouldPressing Enter in the Name field submits the form exactly like the Save button.
Status and save API
HTTP endpoints that mirror the page.
FR-API-01
ShouldPOST /api/flow/save with a name returns 200 {"status":"Saved: <name>"}; GET /api/flow/status then returns status "Ready" and lastSaved set to the name.
FR-API-02
ShouldPOST /api/flow/save with an empty or missing name returns 422 with errors.name "Name is required".
Non-functional requirements
NFR-01
ShouldThe status line is a polite live region (role "status", aria-live "polite") and the Name field is associated with its label.