Scenario design
Each journey drawn as a graph, and the path every Gherkin scenario walks on it. Kept as code in designs/, beside features/.
A test design maps every state a user, an order or a file can go through, and the transitions between them, before or beside the scenarios. Each scenario is then a path on the map. Plain grey transitions are walked by at least one scenario, dashed red ones by none: the gaps to discuss with the product owner. Clicking a scenario highlights its path in blue; Run runs it on the stack through the Gherkin runner.
Shapes: blue stadium, where a journey starts; hexagon, a check; white box, a state; green, a good outcome; red, a refusal or a failure.
Account access, from the first sign-in to a blocked account
Every way an account goes through the simulated Auth0 tenant: created without a password, the welcome email, the single-use link, the password policy, sign-in, the second factor, ten wrong passwords, the reset. The red dashed transitions are the ones no Gherkin scenario walks yet, such as an account migrated from the legacy login or the link of the Management API.
flowchart TD
new_address(["New plus tag of the QA mailbox"]):::start
seeded(["Seeded account, ada grace zoe or lin"]):::start
unknown(["Email no account uses"]):::start
legacy(["Account migrated from the legacy login"]):::start
signup["Account created without password"]:::state
welcome["Welcome email in the mailbox"]:::state
link_valid{{"Link unused and under 5 days?"}}:::check
policy{{"Password meets the policy?"}}:::check
password_set["Password set"]:::state
signin{{"Right password?"}}:::check
code{{"Code of the app right and never used?"}}:::check
code_refused(["Code refused 401"]):::failure
enrolled["Second factor enrolled, secret kept by the test"]:::state
signed_in(["Signed in 200"]):::outcome
link_refused(["Link refused 400"]):::failure
policy_refused(["Password refused 422"]):::failure
wrong(["Refused 401 same answer as an unknown email"]):::failure
blocked(["Blocked 423"]):::failure
unblock_email["Unblock email in the mailbox"]:::state
no_password(["No password yet 403"]):::failure
reset_email["Reset email in the mailbox"]:::state
ticket["Link from the Management API without email"]:::state
new_address -->|"creates an account"| signup
legacy -->|"migrated keeping its address"| signup
signup -->|"email sent"| welcome
welcome -->|"opens the link"| link_valid
link_valid -->|"yes"| policy
link_valid -->|"used or expired"| link_refused
policy -->|"yes"| password_set
policy -->|"no"| policy_refused
password_set -->|"opens the same link again"| link_valid
password_set -->|"signs in"| signin
password_set -->|"forgot the password"| reset_email
reset_email -->|"opens the reset link"| link_valid
signin -->|"yes"| signed_in
signin -->|"yes, second factor: mfa_required 403"| code
code -->|"yes"| signed_in
code -->|"wrong or already used"| code_refused
code_refused -->|"the next code 30 s later"| code
password_set -->|"enrols an authenticator app"| enrolled
enrolled -->|"signs in"| signin
signin -->|"no"| wrong
wrong -->|"tenth in a row"| blocked
blocked -->|"email sent"| unblock_email
unblock_email -->|"opens the unblock link"| link_valid
seeded -->|"signs in"| signin
seeded -->|"already blocked"| blocked
seeded -->|"never opened the email"| no_password
seeded -->|"QA asks the Management API"| ticket
ticket -->|"opens the link"| link_valid
unknown -->|"signs in"| wrong
linkStyle 0 stroke:#2563eb,stroke-width:4px
linkStyle 1 stroke:#ef4444,stroke-width:1.5px,stroke-dasharray:5 4
linkStyle 2 stroke:#2563eb,stroke-width:4px
linkStyle 3 stroke:#64748b,stroke-width:1.5px
linkStyle 4 stroke:#64748b,stroke-width:1.5px
linkStyle 5 stroke:#64748b,stroke-width:1.5px
linkStyle 6 stroke:#64748b,stroke-width:1.5px
linkStyle 7 stroke:#ef4444,stroke-width:1.5px,stroke-dasharray:5 4
linkStyle 8 stroke:#64748b,stroke-width:1.5px
linkStyle 9 stroke:#64748b,stroke-width:1.5px
linkStyle 10 stroke:#64748b,stroke-width:1.5px
linkStyle 11 stroke:#ef4444,stroke-width:1.5px,stroke-dasharray:5 4
linkStyle 12 stroke:#64748b,stroke-width:1.5px
linkStyle 13 stroke:#64748b,stroke-width:1.5px
linkStyle 14 stroke:#64748b,stroke-width:1.5px
linkStyle 15 stroke:#ef4444,stroke-width:1.5px,stroke-dasharray:5 4
linkStyle 16 stroke:#ef4444,stroke-width:1.5px,stroke-dasharray:5 4
linkStyle 17 stroke:#ef4444,stroke-width:1.5px,stroke-dasharray:5 4
linkStyle 18 stroke:#ef4444,stroke-width:1.5px,stroke-dasharray:5 4
linkStyle 19 stroke:#64748b,stroke-width:1.5px
linkStyle 20 stroke:#64748b,stroke-width:1.5px
linkStyle 21 stroke:#64748b,stroke-width:1.5px
linkStyle 22 stroke:#ef4444,stroke-width:1.5px,stroke-dasharray:5 4
linkStyle 23 stroke:#64748b,stroke-width:1.5px
linkStyle 24 stroke:#64748b,stroke-width:1.5px
linkStyle 25 stroke:#64748b,stroke-width:1.5px
linkStyle 26 stroke:#ef4444,stroke-width:1.5px,stroke-dasharray:5 4
linkStyle 27 stroke:#ef4444,stroke-width:1.5px,stroke-dasharray:5 4
linkStyle 28 stroke:#64748b,stroke-width:1.5px
classDef start fill:#dbeafe,stroke:#2563eb,color:#0f172a
classDef state fill:#ffffff,stroke:#94a3b8,color:#0f172a
classDef check fill:#fef3c7,stroke:#b45309,color:#0f172a
classDef outcome fill:#dcfce7,stroke:#15803d,color:#0f172a
classDef failure fill:#fee2e2,stroke:#b91c1c,color:#0f172aGaps: transitions no scenario walks
| From | Transition | To |
|---|---|---|
| Account migrated from the legacy login | migrated keeping its address | Account created without password |
| Password meets the policy? | no | Password refused 422 |
| Reset email in the mailbox | opens the reset link | Link unused and under 5 days? |
| Code of the app right and never used? | wrong or already used | Code refused 401 |
| Code refused 401 | the next code 30 s later | Code of the app right and never used? |
| Password set | enrols an authenticator app | Second factor enrolled, secret kept by the test |
| Second factor enrolled, secret kept by the test | signs in | Right password? |
| Unblock email in the mailbox | opens the unblock link | Link unused and under 5 days? |
| Seeded account, ada grace zoe or lin | QA asks the Management API | Link from the Management API without email |
| Link from the Management API without email | opens the link | Link unused and under 5 days? |