Commit 840438432c57dbdb732192c828a4c5db475fa2d2
Committed by
Daniela Feitosa
1 parent
ca535c0a
Exists in
master
and in
29 other branches
admin_categories.feature
Showing
1 changed file
with
14 additions
and
14 deletions
Show diff stats
features/admin_categories.feature
@@ -16,22 +16,22 @@ Feature: manage categories | @@ -16,22 +16,22 @@ Feature: manage categories | ||
16 | @selenium | 16 | @selenium |
17 | Scenario: admin user could access new category | 17 | Scenario: admin user could access new category |
18 | Given I follow "Administration" | 18 | Given I follow "Administration" |
19 | - When I follow "Manage Categories" | ||
20 | - And I follow "New category" and wait | 19 | + When I follow "Categories" |
20 | + And I follow "New category" | ||
21 | Then I should be on /admin/categories/new | 21 | Then I should be on /admin/categories/new |
22 | 22 | ||
23 | @selenium | 23 | @selenium |
24 | Scenario: admin user could create a category | 24 | Scenario: admin user could create a category |
25 | - Given I visit "/admin/categories/new" and wait | ||
26 | - When I fill in "Name" with "Category 1" | ||
27 | - And I press "Save" | ||
28 | - Then I should see "Categories" | ||
29 | - And I should see "Category 1" | 25 | + Given I go to /admin/categories/new |
26 | + And I fill in "Name" with "Category 1" | ||
27 | + When I press "Save" | ||
28 | + Then I should see "Categories" | ||
29 | + And I should see "Category 1" | ||
30 | 30 | ||
31 | @selenium | 31 | @selenium |
32 | Scenario: admin user could see all the category tree | 32 | Scenario: admin user could see all the category tree |
33 | Given I follow "Administration" | 33 | Given I follow "Administration" |
34 | - And I follow "Manage Categories" | 34 | + And I follow "Categories" |
35 | When I follow "Show" | 35 | When I follow "Show" |
36 | Then I should see "Vegetarian" | 36 | Then I should see "Vegetarian" |
37 | And I should see "Steak" | 37 | And I should see "Steak" |
@@ -39,13 +39,13 @@ Feature: manage categories | @@ -39,13 +39,13 @@ Feature: manage categories | ||
39 | @selenium | 39 | @selenium |
40 | Scenario: admin user could hide the category tree | 40 | Scenario: admin user could hide the category tree |
41 | Given I follow "Administration" | 41 | Given I follow "Administration" |
42 | - And I follow "Manage Categories" | ||
43 | - When I follow "Show" | 42 | + And I follow "Categories" |
43 | + When I follow "Show" and wait while it hides | ||
44 | Then I should see "Vegetarian" | 44 | Then I should see "Vegetarian" |
45 | And I should see "Steak" | 45 | And I should see "Steak" |
46 | - When I follow "Hide" and sleep 1 second | ||
47 | - Then I should not see "Vegetarian" | ||
48 | - And I should not see "Steak" | 46 | + When I follow "Hide" and wait while it hides |
47 | + Then "Vegetarian" should not be visible within "div" | ||
48 | + And "Steak" should not be visible within "div" | ||
49 | 49 | ||
50 | @selenium | 50 | @selenium |
51 | Scenario: the show link is available just for categories with category tree | 51 | Scenario: the show link is available just for categories with category tree |
@@ -54,7 +54,7 @@ Feature: manage categories | @@ -54,7 +54,7 @@ Feature: manage categories | ||
54 | | Steak | Pig | true | | 54 | | Steak | Pig | true | |
55 | And I am on the homepage | 55 | And I am on the homepage |
56 | When I follow "Administration" | 56 | When I follow "Administration" |
57 | - And I follow "Manage Categories" | 57 | + And I follow "Categories" |
58 | Then I should see "Food Show" | 58 | Then I should see "Food Show" |
59 | When I follow "Show" | 59 | When I follow "Show" |
60 | Then I should see "Vegetarian" | 60 | Then I should see "Vegetarian" |