From f205672c4c2ba693b0ac6bc8631cf0305db92dc0 Mon Sep 17 00:00:00 2001 From: Joenio Costa Date: Tue, 20 Mar 2012 22:34:09 -0300 Subject: [PATCH] Adding checkbox to mark product as highlight --- app/views/manage_products/_edit_info.rhtml | 4 ++++ features/manage_products.feature | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/app/views/manage_products/_edit_info.rhtml b/app/views/manage_products/_edit_info.rhtml index b904136..54157d5 100644 --- a/app/views/manage_products/_edit_info.rhtml +++ b/app/views/manage_products/_edit_info.rhtml @@ -21,6 +21,10 @@ <%= _('Available') %> <%= labelled_radio_button( _('Yes'), 'product[available]', true, @product.available, :id => 'product_available') + labelled_radio_button( _('No'), 'product[available]', false, !@product.available) %> + + <%= f.label :highlighted, _('Highlight product') %> + <%= f.check_box(:highlighted) %> + <% if !environment.qualifiers.empty? %> diff --git a/features/manage_products.feature b/features/manage_products.feature index a09d234..5e7b10f 100644 --- a/features/manage_products.feature +++ b/features/manage_products.feature @@ -526,3 +526,17 @@ Feature: manage products And I follow "Delete qualifier" And I press "Save" Then I should not see "Organic (Self declared)" + + @selenium + Scenario: Show checkbox to mark product as highlight + Given the following product_category + | name | + | Bicycle | + And the following products + | owner | category | name | + | redemoinho | bicycle | Bike | + And I am logged in as "joaosilva" + When I go to Rede Moinho's page of product Bike + And I follow "Add price and other basic information" + Then I should see "Highlight product" + And I check "Highlight product" -- libgit2 0.21.2