Skip to content

Commit

Permalink
Refactored to make use of the web steps 'I am on' step.
Browse files Browse the repository at this point in the history
  • Loading branch information
baphled committed Jul 16, 2010
1 parent fdc29b1 commit d244b2f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
6 changes: 1 addition & 5 deletions features/enhanced/ajax_list_pagination.feature
Expand Up @@ -7,17 +7,15 @@ Feature: Pagination should be done with AJAX if possible
Given there is a project
And the project has more than 5 features
When I am on "projects features"
And the feature page is loaded
And we click page "2"
Then the JS message "Page loading..." should be displayed
When I visit the projects features
When I am on the "projects features"
And the feature page is loaded

Scenario: All lists should display the current page they are one
Given there is a project
And the project has more than 5 features
When I am on "projects features"
And the feature page is loaded
And we click page "2"
Then the JS message "Page loading..." should be displayed
And the current page number should be displayed
Expand All @@ -26,7 +24,6 @@ Feature: Pagination should be done with AJAX if possible
Given there is a project
And the project has more than 5 features
When I am on "projects features"
And the feature page is loaded
And we click page "2"
Then the page should not refresh
And there should be an AJAX request
Expand All @@ -36,7 +33,6 @@ Feature: Pagination should be done with AJAX if possible
Given there is a project
And the project has more than 5 features
When I am on "projects features"
And the feature page is loaded
And we click page "2"
And the first feature is hovered over
Then the features information will be display in the sidebar
7 changes: 2 additions & 5 deletions features/enhanced/ajaxified_forms.feature
Expand Up @@ -20,9 +20,7 @@ Feature: All our forms need to be passed to the server via AJAX
And a flash message "was updated" should be dynamically displayed

Scenario: We should be able to submit a new feature form via AJAX
Given there are features
When I am on "all features"
And I click new features
When I am on "new feature"
And I fill in the feature form
Then submit the form
And there should be an AJAX request
Expand All @@ -49,8 +47,7 @@ Feature: All our forms need to be passed to the server via AJAX
And a flash message "was created" should be dynamically displayed

Scenario: We should be able to submit an editted story form via AJAX
Given I can view the stories page
And there is a story
Given there is a story
When I am on "edit story"
And uncheck a feature it is associated to
Then submit the form
Expand Down
12 changes: 6 additions & 6 deletions features/enhanced/resource_form_client_side.feature
Expand Up @@ -12,24 +12,24 @@ Feature: Client side validations for our parking form
And the form should have an client side error

Scenario: The parking resource project must be entered
Given I can view the parking page
When I follow "New Resource information"
When I am on the "parking index" page
And I follow "New Resource information"
And I fill in the resource form project with ""
Then submit the form
And a JS based error message should be displayed
And the form should have an client side error

Scenario: The parking resource name must be at least 3 characters
Given I can view the parking page
When I follow "New Resource information"
When I am on the "parking index" page
And I follow "New Resource information"
And I fill in the resource form name with "fo"
Then submit the form
And a JS based error message should be displayed
And the client side error message should be "Please enter at least 3 characters."

Scenario: The parking resource project must be at least 3 characters
Given I can view the parking page
When I follow "New Resource information"
When I am on the "parking index" page
And I follow "New Resource information"
And I fill in the resource form project with "fo"
Then submit the form
And a JS based error message should be displayed
Expand Down

0 comments on commit d244b2f

Please sign in to comment.