Commit f2ff532f75c1dbe9fdc02e01e48e1584084f2bdc
1 parent
a6d54e06
Exists in
master
and in
3 other branches
Update categories software block
- Open search softwares page with "all" selected Signed-off-by: Gabriel Silva <gabriel93.silva@gmail.com> Signed-off-by: Luciano Prestes Cavalcanti <lucianopcbr@gmail.com>
Showing
2 changed files
with
35 additions
and
1 deletions
Show diff stats
src/noosfero-spb/software_communities/features/categories_softwares_block.feature
0 → 100644
... | ... | @@ -0,0 +1,34 @@ |
1 | +Feature: go to software search when click on category | |
2 | + As a user | |
3 | + I want to select a category | |
4 | + to see the softwares with the selected category | |
5 | + | |
6 | + Background: | |
7 | + Given "SoftwareCommunitiesPlugin" plugin is enabled | |
8 | + And I am logged in as mpog_admin | |
9 | + And I go to /admin/plugins | |
10 | + And I check "SoftwareCommunitiesPlugin" | |
11 | + And I press "Save changes" | |
12 | + And the following categories | |
13 | + | name | display_in_menu | | |
14 | + | Software | true | | |
15 | + And the following categories | |
16 | + | parent | name | display_in_menu | | |
17 | + | Software | Health | true | | |
18 | + | Software | Education | true | | |
19 | + And the following softwares | |
20 | + | name | public_software | categories | finality | | |
21 | + | Software One | true | Health | some finality | | |
22 | + | Software Two | true | Health, Education | some finality | | |
23 | + | Software Three | false | Education | some finality | | |
24 | + And the following blocks | |
25 | + | owner | type | | |
26 | + | environment | CategoriesSoftwareBlock | | |
27 | + | |
28 | + Scenario: Search softwares by education category | |
29 | + Given I go to / | |
30 | + When I follow "Education" | |
31 | + Then I should see "Software Two" | |
32 | + And I should see "Software Three" | |
33 | + And I should not see "Software One" | |
34 | + | ... | ... |
src/noosfero-spb/software_communities/views/blocks/categories_software.html.erb
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | |
11 | 11 | <% categories.each do |category| %> |
12 | 12 | <% unless category.software_infos.count < 1 %> |
13 | - <li><%= link_to _("#{category.name}") + " (#{category.software_infos.count})", {:controller => :search, :action => block.search_catalog, :selected_categories_id => [category.id]} %></li> | |
13 | + <li><%= link_to _("#{category.name}") + " (#{category.software_infos.count})", {:controller => :search, :action => block.search_catalog, :selected_categories_id => [category.id], :software_type => "all" } %></li> | |
14 | 14 | <% end %> |
15 | 15 | <% end %> |
16 | 16 | </ul> | ... | ... |