Last active
December 14, 2015 23:18
-
-
Save ratbeard/5164225 to your computer and use it in GitHub Desktop.
This file contains 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: Validating user input | |
In order to prevent shipping errors | |
Users input should be validated | |
@javascript | |
Scenario: Client-side form validation | |
Given I am on the form step | |
When I click "Submit" | |
Then I should see validation errors: | |
| Field | Message | | |
| first_name | This field is required. | | |
| last_name | This field is required. | | |
| address_1 | This field is required. | | |
| city | This field is required. | | |
| state | This field is required. | | |
| zip_code | This field is required. | | |
| birth_year | This field is required. | | |
| email | This field is required. | | |
| email_confirmation | This field is required. | | |
| accept_terms | This field is required. | | |
When I fill in: | |
| Field | Value | | |
| first_name | Mike | | |
| last_name | O'Garnagle | | |
| address_1 | 123 Fake Street | | |
| city | Minneapolis | | |
| state | Minnesota | | |
| zip_code | Invalid zip | | |
| birth_year | 1985 | | |
| email | [email protected] | | |
| email_confirmation | [email protected] | | |
| accept_terms | checked | | |
Then I should see validation errors: | |
| Field | Message | | |
| zip_code | Please enter a five digit US zipcode. | | |
| email_confirmation | Please enter the same value again. | | |
When I fill in: | |
| Field | Value | | |
| zip_code | 55401 | | |
| email_confirmation | [email protected] | | |
Then I should see no validation errors | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment