Commit c5363ef090a2afffdbbcacbb093a974ca0ce6693
1 parent
63a1f9a0
Exists in
master
and in
29 other branches
Cucumber feature for searching communities
Showing
1 changed file
with
104 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,104 @@ |
1 | +Feature: search communities | |
2 | + As a noosfero user | |
3 | + I want to search communities | |
4 | + In order to find ones that interest me | |
5 | + | |
6 | + Background: | |
7 | + Given the search index is empty | |
8 | + And the following category | |
9 | + | name | | |
10 | + | social network | | |
11 | + And the following community | |
12 | + | identifier | name | category | | |
13 | + | noosfero | Noosfero Community | social-network | | |
14 | + | |
15 | + Scenario: show recent communities on index (empty query) | |
16 | + Given the following community | |
17 | + | identifier | name | category | | |
18 | + | linux | Linux Community | software-livre | | |
19 | + When I go to the search communities page | |
20 | + Then I should see "Noosfero Community" within "#search-results" | |
21 | + And I should see "Linux Community" within "#search-results" | |
22 | + | |
23 | + Scenario: simple search for community | |
24 | + When I go to the search communities page | |
25 | + And I fill in "query" with "noosfero" | |
26 | + And I press "Search" | |
27 | + Then I should see "Noosfero Community" within "#search-results" | |
28 | + | |
29 | + Scenario: search communities by category | |
30 | + Given the following category | |
31 | + | name | | |
32 | + | Software Livre | | |
33 | + And the following community | |
34 | + | identifier | name | category | | |
35 | + | noos-comm | Noosfero Community | software-livre | | |
36 | + When I go to the search communities page | |
37 | + And I fill in "query" with "software livre" | |
38 | + And I press "Search" | |
39 | + Then I should see "Noosfero" within "#search-results" | |
40 | + | |
41 | + Scenario: see category facets when searching | |
42 | + Given the following categories as facets | |
43 | + | name | | |
44 | + | Temáticas | | |
45 | + And the following category | |
46 | + | name | parent | | |
47 | + | Software Livre | tematicas | | |
48 | + And the following community | |
49 | + | identifier | name | category | | |
50 | + | linux | Linux Community | software-livre | | |
51 | + When I go to the search communities page | |
52 | + And I fill in "query" with "Linux" | |
53 | + And I press "Search" | |
54 | + Then I should see "Temáticas" within "#facets-menu" | |
55 | + | |
56 | + Scenario: find communities without exact query | |
57 | + Given the following communities | |
58 | + | identifier | name | | |
59 | + | luwac | Linux Users Without a Clue | | |
60 | + When I go to the search communities page | |
61 | + And I fill in "query" with "Linux Clue" | |
62 | + And I press "Search" | |
63 | + Then I should see "Linux Users Without a Clue" within "#search-results" | |
64 | + | |
65 | + Scenario: filter communities by facet | |
66 | + Given the following categories as facets | |
67 | + | name | | |
68 | + | Temáticas | | |
69 | + And the following category | |
70 | + | name | parent | | |
71 | + | Software Livre | tematicas | | |
72 | + | Big Brother | tematicas | | |
73 | + And the following communities | |
74 | + | identifier | name | category | | |
75 | + | noos-dev | Noosfero Developers | software-livre | | |
76 | + | facebook | Facebook Developers | big-brother | | |
77 | + When I go to the search communities page | |
78 | + And I fill in "query" with "Developers" | |
79 | + And I press "Search" | |
80 | + And I follow "Software Livre" within "#facets-menu" | |
81 | + Then I should see "Noosfero Developers" within "#search-results" | |
82 | + And I should not see "Facebook Developers" | |
83 | + | |
84 | + Scenario: remember facet filter when searching new query | |
85 | + Given the following categories as facets | |
86 | + | name | | |
87 | + | Temáticas | | |
88 | + And the following category | |
89 | + | name | parent | | |
90 | + | Software Livre | tematicas | | |
91 | + | Other Category | tematicas | | |
92 | + And the following communities | |
93 | + | identifier | name | category | | |
94 | + | noos-dev | Noosfero Developers | software-livre | | |
95 | + | rails-dev | Rails Developers | other-category | | |
96 | + | rails-usr | Rails Users | software-livre | | |
97 | + When I go to the search communities page | |
98 | + And I fill in "query" with "Developers" | |
99 | + And I press "Search" | |
100 | + And I follow "Software Livre" within "#facets-menu" | |
101 | + And I fill in "query" with "Rails" | |
102 | + And I press "Search" | |
103 | + Then I should see "Rails Users" within "#search-results" | |
104 | + And I should not see "Rails Developers" | ... | ... |