Commit 7d360cd3b326fad8bce80c854119450e66a54d79

Authored by Rodrigo Souto
1 parent 8476dfd0

categories-block: fixing cucumber tests

Still not completely fixed
app/models/categories_block.rb
... ... @@ -8,6 +8,8 @@ class CategoriesBlock < Block
8 8  
9 9 settings_items :category_types, :type => Array, :default => []
10 10  
  11 + attr_accessible :category_types
  12 +
11 13 def self.description
12 14 _("Categories Menu")
13 15 end
... ...
features/categories_block.feature
... ... @@ -28,7 +28,8 @@ Feature: categories_block
28 28  
29 29 @selenium
30 30 Scenario: List just product categories
31   - Given I follow "Edit" within ".categories-block"
  31 + Given display ".button-bar"
  32 + And I follow "Edit" within ".categories-block"
32 33 And I check "Product"
33 34 When I press "Save"
34 35 Then I should see "Food"
... ... @@ -39,7 +40,8 @@ Feature: categories_block
39 40  
40 41 @selenium
41 42 Scenario: Show submenu if it exists
42   - Given I follow "Edit" within ".categories-block"
  43 + Given display ".button-bar"
  44 + And I follow "Edit" within ".categories-block"
43 45 And I check "Product"
44 46 And I press "Save"
45 47 Then I should see "Food"
... ... @@ -56,7 +58,8 @@ Feature: categories_block
56 58  
57 59 @selenium
58 60 Scenario: Show only one submenu per time
59   - Given I follow "Edit" within ".categories-block"
  61 + Given display ".button-bar"
  62 + And I follow "Edit" within ".categories-block"
60 63 And I check "Product"
61 64 And I press "Save"
62 65 Then I should see "Book"
... ... @@ -66,14 +69,16 @@ Feature: categories_block
66 69  
67 70 @selenium
68 71 Scenario: List just general categories
69   - Given I follow "Edit" within ".categories-block"
  72 + Given display ".button-bar"
  73 + And I follow "Edit" within ".categories-block"
70 74 And I check "Generic category"
71 75 When I press "Save"
72 76 Then I should see "Wood"
73 77  
74 78 @selenium
75 79 Scenario: List just regions
76   - Given I follow "Edit" within ".categories-block"
  80 + Given display ".button-bar"
  81 + And I follow "Edit" within ".categories-block"
77 82 And I check "Region"
78 83 When I press "Save"
79 84 Then I should see "Bahia"
... ...