small medium large xlarge

6ec88fb092a2aad93c7af6d645fff57a_pragsmall
26 Jul 2012, 04:25
Yong Bakos (5 posts)

I was wondering what sort of Scenario refactoring folks have come up with for the “Try This” exercise at the end of chapter six. Here’s what I came up with (two scenarios from the long shitty one):

Scenario: View a client account
  Given a "Test Client" exists with a project and work unit
  When I visit the invoices page
  Then I should see the "Test Client" account listed

Scenario: Recording an invoice
  Given I am on the details screen for "Test Client"
  When I enter an invoice id
  And I visit the invoices page
  Then I should not see "Test Client"

</code>

But, I can’t determine what the authors are alluding to regarding the “crucial Then step that was missing from the original scenario.”

You must be logged in to comment