Commit 37a1dde7f1af78ad34861588010d998bf734121a

Authored by Rodrigo Souto
1 parent d4d5dea2

categories-block-features: avoid test failure

Avoiding test failure by moving selenium specific code out of the
background so it doesn't run on cucumber only testing.
Showing 1 changed file with 10 additions and 6 deletions   Show diff stats
features/categories_block.feature
... ... @@ -25,7 +25,6 @@ Feature: categories_block
25 25 | environment | CategoriesBlock |
26 26 And I am logged in as admin
27 27 And I go to /admin/environment_design
28   - And display ".button-bar"
29 28  
30 29 # Note that this @ignore-hidden-elements only works for seeing hidden
31 30 # elements. It actually doesn't work for following hidden link or pressing
... ... @@ -33,7 +32,8 @@ Feature: categories_block
33 32 # the link.
34 33 @selenium @ignore-hidden-elements
35 34 Scenario: List just product categories
36   - Given I follow "Edit" within ".categories-block"
  35 + Given display ".button-bar"
  36 + And I follow "Edit" within ".categories-block"
37 37 And I check "Product"
38 38 When I press "Save"
39 39 Then I should see "Food"
... ... @@ -44,7 +44,8 @@ Feature: categories_block
44 44  
45 45 @selenium
46 46 Scenario: Show submenu if it exists
47   - Given I follow "Edit" within ".categories-block"
  47 + Given display ".button-bar"
  48 + And I follow "Edit" within ".categories-block"
48 49 And I check "Product"
49 50 And I press "Save"
50 51 Then I should see "Food"
... ... @@ -61,7 +62,8 @@ Feature: categories_block
61 62  
62 63 @selenium
63 64 Scenario: Show only one submenu per time
64   - Given I follow "Edit" within ".categories-block"
  65 + Given display ".button-bar"
  66 + And I follow "Edit" within ".categories-block"
65 67 And I check "Product"
66 68 And I press "Save"
67 69 Then I should see "Book"
... ... @@ -71,14 +73,16 @@ Feature: categories_block
71 73  
72 74 @selenium
73 75 Scenario: List just general categories
74   - Given I follow "Edit" within ".categories-block"
  76 + Given display ".button-bar"
  77 + And I follow "Edit" within ".categories-block"
75 78 And I check "Generic category"
76 79 When I press "Save"
77 80 Then I should see "Wood"
78 81  
79 82 @selenium
80 83 Scenario: List just regions
81   - Given I follow "Edit" within ".categories-block"
  84 + Given display ".button-bar"
  85 + And I follow "Edit" within ".categories-block"
82 86 And I check "Region"
83 87 When I press "Save"
84 88 Then I should see "Bahia"
... ...