Commit 840438432c57dbdb732192c828a4c5db475fa2d2

Authored by Daniel Cunha
Committed by Daniela Feitosa
1 parent ca535c0a

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 16 @selenium
17 17 Scenario: admin user could access new category
18 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 21 Then I should be on /admin/categories/new
22 22  
23 23 @selenium
24 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 31 @selenium
32 32 Scenario: admin user could see all the category tree
33 33 Given I follow "Administration"
34   - And I follow "Manage Categories"
  34 + And I follow "Categories"
35 35 When I follow "Show"
36 36 Then I should see "Vegetarian"
37 37 And I should see "Steak"
... ... @@ -39,13 +39,13 @@ Feature: manage categories
39 39 @selenium
40 40 Scenario: admin user could hide the category tree
41 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 44 Then I should see "Vegetarian"
45 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 50 @selenium
51 51 Scenario: the show link is available just for categories with category tree
... ... @@ -54,7 +54,7 @@ Feature: manage categories
54 54 | Steak | Pig | true |
55 55 And I am on the homepage
56 56 When I follow "Administration"
57   - And I follow "Manage Categories"
  57 + And I follow "Categories"
58 58 Then I should see "Food Show"
59 59 When I follow "Show"
60 60 Then I should see "Vegetarian"
... ...