software_catalog.feature
4.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Feature: Search software
As a user
I want to be able to search catalogued software
So that I find a software that fit my needs
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 I go to /account/logout
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 |
Scenario: Show all "public_software" softwares when open search page
Given I go to /search/software_infos
Then I should see "Software One"
Then I should see "Software Two"
Scenario: Show all "public_software" softwares when search software
Given I go to /search/software_infos
And I fill in "search-input" with "Software"
Then I should see "Software One"
Then I should see "Software Two"
@selenium
Scenario: Show software "One" when searching for "Software One"
Given I go to /search/software_infos
And I fill in "search-input" with "One"
And I keyup on selector "#search-input"
Then I should see "Software One"
Then I should not see "Software Two"
@selenium
Scenario: Show software ordered by name when "Name A-Z" is selected
Given I go to /search/software_infos
And I select "Name A-Z" from "sort"
And I press "Filter"
Then I should see "Software One" before "Software Two"
@selenium
Scenario: Show software in reverse order by name when "Name Z-A" is selected
Given I go to /search/software_infos
And I select "Name Z-A" from "sort"
And I sleep for 3 seconds
Then I should see "Software Two" before "Software One"
@selenium
Scenario: Show only "Software Two" when searching for "Education" category
Given I go to /search/software_infos
And I click on anything with selector "#filter-option-catalog-software"
And I check "Education"
Then I should see "Software Two"
And I should not see "Software One"
@selenium
Scenario: Show both Software "One" and "Two" when searching for "Health" category
Given I go to /search/software_infos
And I click on anything with selector "#filter-option-catalog-software"
And I check "Health"
Then I should see "Software One"
And I should see "Software Two"
@selenium
Scenario: Show not "public_software" when "Include in results" is checked
Given I go to /search/software_infos
And I click on anything with selector "#filter-option-catalog-software"
And I check "include_non_public"
Then I should see "Software One"
And I should see "Software Two"
And I should see "Software Three"
@selenium
Scenario: See software rating on catalog
Given plugin "OrganizationRatings" is enabled on environment
And I am logged in as mpog_admin
And I go to /admin/plugins
And I check "Organization Ratings"
And I press "Save changes"
And I go to /admin/admin_panel/site_info
And I select "Software Público" from "environment_theme"
And I press "Save"
And I go to /account/logout
Given the following user
| login | name |
| joaosilva | Joao Silva |
And the following blocks
| owner | type |
| software-two | AverageRatingBlock |
| software-two | OrganizationRatingsBlock |
And the environment domain is "localhost"
And I am logged in as "joaosilva"
And I go to /profile/software-two/plugin/organization_ratings/new_rating
And I press "Enviar"
And I go to /search/software_infos
When I select "Favorites" from "sort"
And I sleep for 3 seconds
Then I should see "Software Two" before "Software One"
And there should be 1 div with class "small-star-positive"
And there should be 4 divs with class "small-star-negative"