Commit 37a1dde7f1af78ad34861588010d998bf734121a
1 parent
d4d5dea2
Exists in
master
and in
23 other branches
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,7 +25,6 @@ Feature: categories_block | ||
| 25 | | environment | CategoriesBlock | | 25 | | environment | CategoriesBlock | |
| 26 | And I am logged in as admin | 26 | And I am logged in as admin |
| 27 | And I go to /admin/environment_design | 27 | And I go to /admin/environment_design |
| 28 | - And display ".button-bar" | ||
| 29 | 28 | ||
| 30 | # Note that this @ignore-hidden-elements only works for seeing hidden | 29 | # Note that this @ignore-hidden-elements only works for seeing hidden |
| 31 | # elements. It actually doesn't work for following hidden link or pressing | 30 | # elements. It actually doesn't work for following hidden link or pressing |
| @@ -33,7 +32,8 @@ Feature: categories_block | @@ -33,7 +32,8 @@ Feature: categories_block | ||
| 33 | # the link. | 32 | # the link. |
| 34 | @selenium @ignore-hidden-elements | 33 | @selenium @ignore-hidden-elements |
| 35 | Scenario: List just product categories | 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 | And I check "Product" | 37 | And I check "Product" |
| 38 | When I press "Save" | 38 | When I press "Save" |
| 39 | Then I should see "Food" | 39 | Then I should see "Food" |
| @@ -44,7 +44,8 @@ Feature: categories_block | @@ -44,7 +44,8 @@ Feature: categories_block | ||
| 44 | 44 | ||
| 45 | @selenium | 45 | @selenium |
| 46 | Scenario: Show submenu if it exists | 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 | And I check "Product" | 49 | And I check "Product" |
| 49 | And I press "Save" | 50 | And I press "Save" |
| 50 | Then I should see "Food" | 51 | Then I should see "Food" |
| @@ -61,7 +62,8 @@ Feature: categories_block | @@ -61,7 +62,8 @@ Feature: categories_block | ||
| 61 | 62 | ||
| 62 | @selenium | 63 | @selenium |
| 63 | Scenario: Show only one submenu per time | 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 | And I check "Product" | 67 | And I check "Product" |
| 66 | And I press "Save" | 68 | And I press "Save" |
| 67 | Then I should see "Book" | 69 | Then I should see "Book" |
| @@ -71,14 +73,16 @@ Feature: categories_block | @@ -71,14 +73,16 @@ Feature: categories_block | ||
| 71 | 73 | ||
| 72 | @selenium | 74 | @selenium |
| 73 | Scenario: List just general categories | 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 | And I check "Generic category" | 78 | And I check "Generic category" |
| 76 | When I press "Save" | 79 | When I press "Save" |
| 77 | Then I should see "Wood" | 80 | Then I should see "Wood" |
| 78 | 81 | ||
| 79 | @selenium | 82 | @selenium |
| 80 | Scenario: List just regions | 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 | And I check "Region" | 86 | And I check "Region" |
| 83 | When I press "Save" | 87 | When I press "Save" |
| 84 | Then I should see "Bahia" | 88 | Then I should see "Bahia" |