Skip to content

Commit

Permalink
[RED] River CRUD: test
Browse files Browse the repository at this point in the history
  • Loading branch information
gajdaw committed Jan 3, 2015
1 parent c4495ec commit de1d51e
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions features/crud.feature
@@ -0,0 +1,69 @@
Feature: I would like to edit rivers

Scenario Outline: Insert records
Given I am on homepage
And I follow "Login"
And I fill in "Username" with "admin"
And I fill in "Password" with "loremipsum"
And I press "Login"
And I go to "/admin/river/"
Then I should not see "<river>"
And I follow "Create a new entry"
Then I should see "River creation"
When I fill in "Name" with "<river>"
And I fill in "Length" with "<length>"
And I press "Create"
Then I should see "<river>"
And I should see "<length>"

Examples:
| river | length |
| ABC RIV | 7182 |
| Vistula RIV | 1234 |
| The Thames RIV | 555 |


Scenario Outline: Edit records
Given I am on homepage
And I follow "Login"
And I fill in "Username" with "admin"
And I fill in "Password" with "loremipsum"
And I press "Login"
And I go to "/admin/river/"
Then I should not see "<new-river>"
When I follow "<old-river>"
Then I should see "<old-river>"
When I follow "Edit"
And I fill in "Name" with "<new-river>"
And I fill in "Length" with "<new-length>"
And I press "Update"
And I follow "Back to the list"
Then I should see "<new-river>"
And I should see "<new-length>"
And I should not see "<old-river>"

Examples:
| old-river | new-river | new-length |
| Vistula RIV | VI-stula RIV | 9876 |
| ABC RIV | The NEW RIV | 3333 |


Scenario Outline: Delete records
Given I am on homepage
And I follow "Login"
And I fill in "Username" with "admin"
And I fill in "Password" with "loremipsum"
And I press "Login"
And I go to "/admin/river/"
Then I should see "<river>"
When I follow "<river>"
Then I should see "<river>"
When I press "Delete"
Then I should not see "<river>"

Examples:
| river |
| VI-stula RIV |
| The NEW RIV |
| The Thames RIV |

0 comments on commit de1d51e

Please sign in to comment.