I was able to remove a bunch of the code that was causing problems in my last entry. We decided to simplify the UI for the participant sign-in form in our Worth sprint this week. I wish we decided it sooner – maybe I should've proposed a change in the beginning.
So far, I feel like the gherkin syntax is a little awkward. I don't know if it makes sense to expect these tests to ever be written by someone not familiar with the application code – they are just too idiosyncratic.
However, ultimately it does give a nicely readable account of the process of testing the intervention:
Scenario: Session 2 When I access the url "/pages/session-2/" When I click the next button Then I am at the url "/pages/session-2/welcome-to-session-2/" Then I see the text "Welcome to Session 2" When I click the next button Then I am at the url "/pages/session-2/i-am-worth-it/" Then I see the text "I am WORTH It!" When I click the submit button Then I see the text "Oops!" When I select the first quiz option When I click the submit button Then I am at the url "/pages/session-2/ground-rules/"
At to.be I used the "describe/it" syntax, which is also considered "behavior-driven development", and is common in rspec (Ruby) and mocha (JS).