Skip to content

Instantly share code, notes, and snippets.

@ericnormand
Last active November 18, 2025 13:35
Show Gist options
  • Select an option

  • Save ericnormand/b25712186bb210ab1c52f06655e7dfbd to your computer and use it in GitHub Desktop.

Select an option

Save ericnormand/b25712186bb210ab1c52f06655e7dfbd to your computer and use it in GitHub Desktop.
# Coffee shop scenario
Background: *This scenario is from a self-service ordering touchscreen at a coffee shop that you are assigned to develop. Jill is a customer who wants some coffee.*
Jill starts to order some coffee at the touchscreen. She adds a small, dark roast. Then
she adds a large medium roast with double almond syrup. She adds a
medium medium roast with two soy milk shots (the second one by
accident). She reads the price and it's too expensive. So she removes
the second coffee (the one with the almond syrup). Then she realizes
the third coffee has two soy milk shots and she removes one. The price
looks good, so she submits the order.
@emil0r
Copy link

emil0r commented Nov 18, 2025

Coffee shop scenario

;; Background: This scenario is from a self-service ordering touchscreen at a
;; coffee shop that you are assigned to develop. Jill is a customer who wants
;; some coffee.

;; order: Jill starts to order
;; coffee: some coffee at the touchscreen.
;; roast: She adds a small, dark roast.
;; amend-order: Then she adds a
;; coffee: large medium roast
;; complement syrup: with double almond syrup.
;; amend-order: She adds a medium
;; roast: medium roast
;; complement soy milk: with two soy milk shots
;; complement soy milk - second time: (the second one by accident).
;; She reads the price and it's too expensive.
;; amend-order (by index): So she removes the second coffee (the one with the almond syrup).
;; amend-order (remove complement by index to a coffee): Then she realizes the third coffee has two soy milk shots and she removes one.
;; execute-order: The price looks good, so she submits the order.

;; parts
;; - order - [index of coffees]
;; - coffee - [type, complements]
;; - complement - [type]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment