The Third Test: Fill and Submit Form
Let’s implement the third feature test.
We'll cover the following...
We'll cover the following...
Setting up the test
Our third step is "I fill in and submit the registration form"
.
Considering what the step needs to accomplish, the code below illustrates how a user might complete that step:
Press + to interact
When("I fill in and submit the registration form") dofill_in "user-name", with: "jdoe"fill_in "user-email", with: "jdoe@example.com"fill_in "user-password", with: "secret1234"fill_in "user-password-confirmation", with: "secret1234"click_on "user-registration-submit"end
Looking good. That’s what we imagine the user doing when they fill in the registration form. ...