I would like to see other’s declarative rewrite of the scenario described on p103
Great idea! Would you care to share yours?
Scenario: Completion of work creates a pending invoice Given an issue has been opened for client "Test Client" When that issue has been marked completed Then "Test Client" is listed on the admin invoices page Scenario: Submission of invoice removes it from pending list Given one pending invoice for client "Test Client" When the admin user submits that invoice Then an invoice is emailed to "Test Client" # or should it be printed? And "Test Client" is NOT listed on the admin invoices page
Note that these were written by myself, without a Three Amigos discussion about the intent. I’ve had to guess at the intentions of the original scenario. By my reading, there could also be an intention that the admin must add an
invoice_id in order to submit an invoice. I would describe such an intention with a negative case:
Scenario: Submission of invoice requires an Invoice ID Given one pending invoice for client "Test Client" When the admin user submits that invoice without an Invoice ID Then the system reminds the admin user that Invoice ID is required.
Making these scenarios declarative makes me realize there are other examples I want to check. What happens when two issues are marked completed for the same client? What happens when there are two pending invoices for the same client, and only one of them is submitted? If two issues are invoiced at the same time, are they submitted to the client as one or two invoices? What happens when there are multiple open projects for a client?