From e7944593a9e75b98837e63355e918ced8c3aca0e Mon Sep 17 00:00:00 2001 From: Joenio Costa Date: Tue, 20 Mar 2012 22:00:51 -0300 Subject: [PATCH] Using 'truncate()' method to get first 50 chars of product description --- app/views/blocks/featured_products.rhtml | 2 +- features/featured_products_block.feature | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/views/blocks/featured_products.rhtml b/app/views/blocks/featured_products.rhtml index 1b68288..1a246a2 100644 --- a/app/views/blocks/featured_products.rhtml +++ b/app/views/blocks/featured_products.rhtml @@ -14,7 +14,7 @@ diff --git a/features/featured_products_block.feature b/features/featured_products_block.feature index 8b78a09..9ba47f2 100644 --- a/features/featured_products_block.feature +++ b/features/featured_products_block.feature @@ -20,6 +20,7 @@ Feature: featured_products_block | owner | category | name | description | highlighted | | redemoinho | automobile | Car | Red Car | true | | redemoinho | automobile | Truck | Blue Truck | true | + | redemoinho | automobile | Moto | Very long description of and auto-mobile moto to be truncated | true | And I am logged in as "eddievedder" @selenium @@ -33,3 +34,14 @@ Feature: featured_products_block Then I should see "Car" And I should not see "float_to_currency" And I should not see "product_path" + + @selenium + Scenario: display block with long description + Given I follow "Manage my groups" + And I follow "Control panel of this group" + And I follow "Edit sideboxes" + And I follow "Edit" within ".featured-products-block" + And I select "Moto" + And I press "Save" + When I am on redemoinho's homepage + Then I should see "Very long description of and auto-mobile moto to b..." -- libgit2 0.21.2