From 096b293299a41d7ca5a60406d5cab83fa553f463 Mon Sep 17 00:00:00 2001 From: Rafael Martins Date: Fri, 25 May 2012 04:59:33 +0000 Subject: [PATCH] Fixed some search features --- features/search_contents.feature | 4 ++-- features/search_enterprises.feature | 4 ++-- features/step_definitions/noosfero_steps.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/features/search_contents.feature b/features/search_contents.feature index e2cc385..4056ca7 100644 --- a/features/search_contents.feature +++ b/features/search_contents.feature @@ -86,7 +86,7 @@ Feature: search contents Given the following uploaded files | owner | name | filename | | joaosilva | Uploaded Executable | rails | - | joaosilva | Uploaded Spreadsheet | rails | + | joaosilva | Uploaded Spreadsheet | shoes | When I search contents for "Executable" Then I should see "Uploaded Executable" within ".search-uploaded-file-item" And I should not see "Uploaded Spreadsheet" @@ -315,7 +315,7 @@ Feature: search contents When I go to the search articles page And I fill in "query" with "this is an article" And I press "Search" - Then show me the page + # Then show me the page And I follow "Software Livre" within "#facets-menu" Then I should see "noosfero and debian" within "#search-results" And I should not see "facebook and 1984" diff --git a/features/search_enterprises.feature b/features/search_enterprises.feature index 2273ae8..6b87892 100644 --- a/features/search_enterprises.feature +++ b/features/search_enterprises.feature @@ -36,7 +36,7 @@ Feature: search enterprises Scenario: link to enterprise homepage on search results Given I search enterprises for "shoes" When I follow "Shoes shop" - Then I should be on "Shoes shop" homepage + Then I should be on Shoes shop's profile Scenario: show clean enterprise description on search results Given the following articles @@ -110,7 +110,7 @@ Feature: search enterprises | Rails | software-livre | And the following enterprises | identifier | name | category | - | noosfero | Noosfero | Rails | + | noosfero | Noosfero | rails | When I search enterprises for "Rails" Then I should see "Software Livre" within ".search-enterprise-category" And I should see "Rails" within ".search-enterprise-category" diff --git a/features/step_definitions/noosfero_steps.rb b/features/step_definitions/noosfero_steps.rb index 83fc024..326e2c2 100644 --- a/features/step_definitions/noosfero_steps.rb +++ b/features/step_definitions/noosfero_steps.rb @@ -247,7 +247,7 @@ Given /^the following (product_categories|product_category|category|categories|r klass = kind.singularize.camelize.constantize table.hashes.each do |row| parent = row.delete("parent") - if parent + if !parent.blank? parent = Category.find_by_slug(parent.to_slug) row.merge!({:parent_id => parent.id}) end -- libgit2 0.21.2