Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mrerrormessage/2431023 to your computer and use it in GitHub Desktop.
Save mrerrormessage/2431023 to your computer and use it in GitHub Desktop.
Scenario Outline with Consolidated validation
Scenario Outline: Profile creation with invalid fields
Given I am a registered user without a profile
And I login
And visit the profile creation page
When I fill in "<field>" with "<value>"
And I fill in valid values for all other fields
And submit the form
Then I should see an "<error>"
Examples:
| field | value | error |
| first_name | | value_required |
| first_name | a | min_length_2 |
| first_name | 123 | must_be_alpha_only |
| first_name | abc123 | must_be_alpha_only |
| last_name | | value_required |
| last_name | a | min_length_2 |
| last_name | 1234 | must_be_alpha_only |
| last_name | abc123 | must_be_alpha_only |
| phone_number | | value_required |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment