software_catalog.feature
2.09 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
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 "MpogSoftwarePlugin" plugin is enabled
And I am logged in as mpog_admin
And I go to /admin/plugins
And I check "MpogSoftwarePlugin"
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 |
| Software One | true | Health |
| Software Two | false | Health, Education |
Scenario: Show all 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 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"
Scenario: Show softwares one when search software one
Given I go to /search/software_infos
And I fill in "search-input" with "Software One"
And I press "Search"
Then I should see "Software One"
Then I should not see "Software Two"
@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"
Then 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"
Then I should see "Software Two"