From 7d360cd3b326fad8bce80c854119450e66a54d79 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Wed, 4 Jun 2014 11:10:49 -0300 Subject: [PATCH] categories-block: fixing cucumber tests --- app/models/categories_block.rb | 2 ++ features/categories_block.feature | 15 ++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/models/categories_block.rb b/app/models/categories_block.rb index bcf71cb..2601e98 100644 --- a/app/models/categories_block.rb +++ b/app/models/categories_block.rb @@ -8,6 +8,8 @@ class CategoriesBlock < Block settings_items :category_types, :type => Array, :default => [] + attr_accessible :category_types + def self.description _("Categories Menu") end diff --git a/features/categories_block.feature b/features/categories_block.feature index 9957829..608cabc 100644 --- a/features/categories_block.feature +++ b/features/categories_block.feature @@ -28,7 +28,8 @@ Feature: categories_block @selenium Scenario: List just product categories - Given I follow "Edit" within ".categories-block" + Given display ".button-bar" + And I follow "Edit" within ".categories-block" And I check "Product" When I press "Save" Then I should see "Food" @@ -39,7 +40,8 @@ Feature: categories_block @selenium Scenario: Show submenu if it exists - Given I follow "Edit" within ".categories-block" + Given display ".button-bar" + And I follow "Edit" within ".categories-block" And I check "Product" And I press "Save" Then I should see "Food" @@ -56,7 +58,8 @@ Feature: categories_block @selenium Scenario: Show only one submenu per time - Given I follow "Edit" within ".categories-block" + Given display ".button-bar" + And I follow "Edit" within ".categories-block" And I check "Product" And I press "Save" Then I should see "Book" @@ -66,14 +69,16 @@ Feature: categories_block @selenium Scenario: List just general categories - Given I follow "Edit" within ".categories-block" + Given display ".button-bar" + And I follow "Edit" within ".categories-block" And I check "Generic category" When I press "Save" Then I should see "Wood" @selenium Scenario: List just regions - Given I follow "Edit" within ".categories-block" + Given display ".button-bar" + And I follow "Edit" within ".categories-block" And I check "Region" When I press "Save" Then I should see "Bahia" -- libgit2 0.21.2