Skip to content

Commit

Permalink
Refactored duplicate scenarios and placed in our client_side_form_val…
Browse files Browse the repository at this point in the history
…idations feature
  • Loading branch information
baphled committed Jul 23, 2010
1 parent cab6004 commit 36d3dc5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 62 deletions.
36 changes: 28 additions & 8 deletions features/enhanced/client_side_form_validations.feature
Expand Up @@ -38,14 +38,6 @@ Feature: All forms should have client side validations
| new project | project | description | too short | 12 |
| new story | story | scenario | this | 7 |

Scenario: A client side error is displayed if it does not have 'Given' as a prefix
When I am on "new step"
And we fill in the step title with 'we have a new step'
Then submit the form
Then the step should be not saved
And a JS based error message should be displayed
And the client side error message should be "must start with Given, When or Then"

Scenario Outline: All listed models must be unique
Given there is a <model>
When I am on "new <model>"
Expand All @@ -59,3 +51,31 @@ Feature: All forms should have client side validations
| project |
| feature |
| story |

Scenario Outline: Need to display an client side error if there a title is not present
When I am on "new <model>"
Then submit the form
And a JS based error message should be displayed
And the form should have an client side error

Examples: List of forms that should display JS based errors
| model |
| project |
| feature |
| story |
| step |

Scenario: A client side error is displayed if it does not have 'Given' as a prefix
When I am on "new step"
And we fill in the step title with 'we have a new step'
Then submit the form
Then the step should be not saved
And a JS based error message should be displayed
And the client side error message should be "must start with Given, When or Then"

Scenario: A user gets a JS error if A projects location must be a valid project location on their system
When I am on the "new project" page
And we fill in the project location with '/s'
Then submit the form
And a JS based error message should be displayed
And the client side error message should be "Must be a valid project location on your system."
17 changes: 0 additions & 17 deletions features/enhanced/project_form_client_side_validation.feature

This file was deleted.

27 changes: 0 additions & 27 deletions features/enhanced/step_form_client_side_validation.feature

This file was deleted.

10 changes: 0 additions & 10 deletions features/enhanced/stories_form_client_side_validation.feature

This file was deleted.

0 comments on commit 36d3dc5

Please sign in to comment.