From de1d51ee1eacc309f9ffa3589872e7380d8da00b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C5=82odzimierz=20Gajda?= Date: Sat, 3 Jan 2015 10:09:13 +0100 Subject: [PATCH] [RED] River CRUD: test --- features/crud.feature | 69 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 features/crud.feature diff --git a/features/crud.feature b/features/crud.feature new file mode 100644 index 0000000..a69a415 --- /dev/null +++ b/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 "" + And I follow "Create a new entry" + Then I should see "River creation" + When I fill in "Name" with "" + And I fill in "Length" with "" + And I press "Create" + Then I should see "" + And I should see "" + + 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 "" + When I follow "" + Then I should see "" + When I follow "Edit" + And I fill in "Name" with "" + And I fill in "Length" with "" + And I press "Update" + And I follow "Back to the list" + Then I should see "" + And I should see "" + And I should not see "" + + 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 "" + When I follow "" + Then I should see "" + When I press "Delete" + Then I should not see "" + + Examples: + | river | + | VI-stula RIV | + | The NEW RIV | + | The Thames RIV | +