Last active
August 29, 2015 14:20
-
-
Save aslakhellesoy/439ac41d9fd914105751 to your computer and use it in GitHub Desktop.
Just helping someone create better features: http://irclogger.com/.cucumber/2015-04-30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Create Healthcare Study Team user account | |
The back-office users should be able to create a Healthcare | |
Study Team user account. | |
Rules: | |
- The following fields are mandatory: | |
- Gender (male, female) | |
- Last Name | |
- First Name | |
- Email must not be used already | |
- Email must be validated | |
Questions: | |
- What do we do with transgender people? | |
- Do we need to validate Zip code correctness? | |
- Do we need to validate phone/fax numbers? | |
Scenario: All fields are filled out correctly | |
Given the user with email "[email protected]" does not exist | |
When I create a user with email "[email protected]" with all fields filled out | |
Then I should see a confirmation that the account is created | |
And a confirmation email should be sent to "[email protected]" | |
Scenario: Email is already in use | |
Given the user with email "[email protected]" exists | |
When I create a user with email "[email protected]" with all fields filled out | |
Then I should see an error message with the text "This email address is already in use" | |
And no confirmation email should be sent | |
And I should be given the opportunity to edit the existing account instead | |
Scenario: Email is invalid | |
When I create a user with email "aslak#cucumber.io" with all fields filled out | |
Then I should see an error message with the text "This email address is invalid" | |
And no confirmation email should be sent | |
Scenario Outline: Fields are missing | |
Given the user with email "[email protected]" does not exist | |
When I create a user with email "[email protected]" with missing field "<missing_field>" | |
Then I should see an error message with the text "<error_message>" | |
And no confirmation email should be sent | |
Examples: | |
| missing_field | error_message | | |
| Last Name | The last name is required | | |
| First Name | The first name is required | | |
| Email | The email address is required | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wrote this to help out in this discussion: http://irclogger.com/.cucumber/2015-04-30
This was the original spec:

And this was the original feature: