diff --git a/src/noosfero-spb/software_communities/features/categories_softwares_block.feature b/src/noosfero-spb/software_communities/features/categories_softwares_block.feature new file mode 100644 index 0000000..06c4643 --- /dev/null +++ b/src/noosfero-spb/software_communities/features/categories_softwares_block.feature @@ -0,0 +1,34 @@ +Feature: go to software search when click on category + As a user + I want to select a category + to see the softwares with the selected category + + Background: + Given "SoftwareCommunitiesPlugin" plugin is enabled + And I am logged in as mpog_admin + And I go to /admin/plugins + And I check "SoftwareCommunitiesPlugin" + And I press "Save changes" + And the following categories + | name | display_in_menu | + | Software | true | + And the following categories + | parent | name | display_in_menu | + | Software | Health | true | + | Software | Education | true | + And the following softwares + | name | public_software | categories | finality | + | Software One | true | Health | some finality | + | Software Two | true | Health, Education | some finality | + | Software Three | false | Education | some finality | + And the following blocks + | owner | type | + | environment | CategoriesSoftwareBlock | + + Scenario: Search softwares by education category + Given I go to / + When I follow "Education" + Then I should see "Software Two" + And I should see "Software Three" + And I should not see "Software One" + diff --git a/src/noosfero-spb/software_communities/views/blocks/categories_software.html.erb b/src/noosfero-spb/software_communities/views/blocks/categories_software.html.erb index 144350b..8ed545d 100644 --- a/src/noosfero-spb/software_communities/views/blocks/categories_software.html.erb +++ b/src/noosfero-spb/software_communities/views/blocks/categories_software.html.erb @@ -10,7 +10,7 @@ <% categories.each do |category| %> <% unless category.software_infos.count < 1 %> -