ref: master
features/search_contents.feature
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 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
Feature: search contents As a noosfero user I want to search contents In order to find ones that interest me Background: Given the following users | login | name | | joaosilva | Joao Silva | And the following articles | owner | name | body | | joaosilva | bees and butterflies | this is an article about bees and butterflies | | joaosilva | whales and dolphins | this is an article about whales and dolphins | Scenario: show recent content on index When I go to the search articles page Then I should see "bees and butterflies" within "#search-results" And I should see "whales and dolphins" within "#search-results" Scenario: simple search for text articles When I search contents for "whales" Then I should see "whales and dolphins" within ".search-text-article-item" And I should see "whales and dolphins" within ".only-one-result-box" And I should not see "bees and butterflies" When I follow "whales and dolphins" Then I should be on article "whales and dolphins" Scenario: simple search for event Given the following communities | identifier | name | | nice-people | Nice people | And the following events | owner | name | start_date | end_date | | nice-people | Group meeting | 2009-01-01 | 2009-01-02 | | nice-people | John Doe's birthday | 2009-09-01 | 2009-09-02 | When I search contents for "birthday" Then I should see "John Doe's birthday" within ".search-event-item" And I should see "Start date" And I should see "2009-09-01" And I should see "End date" And I should see "2009-09-02" And I should not see "Group meeting" When I follow "John Doe's birthday" Then I should be on article "John Doe's birthday" Scenario: simple search for folder Given the following folders | owner | name | | joaosilva | Music Folder | | joaosilva | Videos Folder | When I search contents for "Music" Then I should see "Music Folder" within ".search-folder-item" And I should see "None" within ".search-folder-items" And I should not see "Videos Folder" When I follow "Music Folder" Then I should be on article "Music Folder" Scenario: simple search for forum Given the following forums | owner | name | | joaosilva | Games Forum | | joaosilva | Movies Folder | When I search contents for "Games" Then I should see "Games Forum" within ".search-forum-item" And I should see "None" within ".search-forum-items" And I should not see "Movies Folder" When I follow "Games Forum" Then I should be on article "Games Forum" Scenario: simple search for gallery Given the following galleries | owner | name | | joaosilva | Landscape Photos | | joaosilva | People Photos | When I search contents for "Landscape" Then I should see "Landscape Photos" within ".search-gallery" And I should not see "People Photos" When I follow "Landscape Photos" Scenario: simple search for uploaded file Given the following uploaded files | owner | filename | | joaosilva | rails.png | | joaosilva | shoes.png | When I search contents for "rails.png" Then I should see "rails.png" within ".search-uploaded-file-item" And I should not see "shoes.png" When I follow "rails.png" Then I should be on article "rails.png" Scenario: show event search results without end date Given the following communities | identifier | name | | nice-people | Nice people | And the following events | owner | name | | nice-people | John Doe's birthday | When I search contents for "birthday" Then I should see "John Doe's birthday" within ".search-event-item" And I should not see "End date" Scenario: show and link last items on folder search results Given the following folders | owner | name | | joaosilva | Music Folder | And the following articles | owner | name | parent | | joaosilva | Steven Wilson | Music Folder | | joaosilva | Porcupine Tree | Music Folder | | joaosilva | Blackfield | Music Folder | When I search contents for "Music" Then I should see "Last items" within ".search-folder-items" And I should see "Blackfield" And I should see "Porcupine Tree" And I should see "Steven Wilson" When I follow "Porcupine Tree" Then I should be on article "Porcupine Tree" Scenario: show and link last topics on forum search results Given the following forums | owner | name | | joaosilva | Games Forum | And the following articles | owner | name | parent | | joaosilva | Mass Effect 3 | Games Forum | | joaosilva | The Witcher 2 | Games Forum | | joaosilva | Syndicate | Games Forum | And the following rss feeds | joaosilva | Diablo 3 News Feed | Games Forum | When I search contents for "Games" Then I should see "Last topics" within ".search-forum-items" And I should see "Syndicate" And I should see "The Witcher 2" And I should see "Mass Effect 3" And I should not see "Diablo 3" When I follow "The Witcher 2" Then I should be on article "The Witcher 2" Scenario: link to parent in uploaded file search results Given the following folders | owner | name | | joaosilva | Folder for Uploaded Files | Given the following uploaded files | owner | parent | filename | | joaosilva | Folder for Uploaded Files | rails.png | When I search contents for "rails.png" Then I should see "Folder for Uploaded Files" within ".search-uploaded-file-parent" When I follow "Folder for Uploaded Files" Then I should be on article "Folder for Uploaded Files" Scenario: link to author on search results When I go to the search articles page And I fill in "search-input" with "whales" And I press "Search" Then I should see "Author" within ".search-article-author" Then I should see "Joao Silva" within ".search-article-author-name" When I follow "Joao Silva" Then I should be on joaosilva's profile Scenario: show clean description excerpt on search results Given the following articles | owner | name | body | | joaosilva | Herreninsel | The island <b>Herreninsel</b>, with an area of 238 hectares, is the biggest of the three main islands of the Chiemsee, a lake in the state of Bavaria, Germany. Together with the islands of Fraueninsel and Krautinsel it forms the municipality of Chiemsee. | When I go to the search articles page And I fill in "search-input" with "island" And I press "Search" Then I should see "Description" within ".search-article-description" And I should see "The island Herreninsel, with" within ".search-article-description" And I should see "and Kraut..." within ".search-article-description" Scenario: show empty description on search results Given the following articles | owner | name | body | | joaosilva | Herreninsel | | When I go to the search articles page And I fill in "search-input" with "Herreninsel" And I press "Search" Then I should see "None" within ".search-article-description" Scenario: link to tags on search results Given the following tags | article | name | | bees and butterflies | Hymenoptera | | bees and butterflies | Lepidoptera | When I go to the search articles page And I fill in "search-input" with "bees" And I press "Search" Then I should see "Tags" within ".search-article-tags" And I should see "Hymenoptera" within ".search-article-tags" And I should see "Lepidoptera" within ".search-article-tags" When I follow "Hymenoptera" Then I should be on Hymenoptera's tag page Scenario: show empty tags in search results When I go to the search articles page And I fill in "search-input" with "dolphins" And I press "Search" Then I should see "None" within ".search-article-tags" Scenario: link to categories on search results Given the following category | name | | Soviet | And the following articles | owner | name | body | category | | joaosilva | Sergei Sorokin | Retired ice hockey player | soviet | When I go to the search articles page And I fill in "search-input" with "hockey" And I press "Search" Then I should see "Categories" within ".search-article-categories" And I should see "Soviet" within ".search-article-category" Scenario: show empty categories on search results When I go to the search articles page And I fill in "search-input" with "whales" And I press "Search" Then I should see "whales and dolphins" And I should see "None" within ".search-article-categories-container" Scenario: show date of last update from original author When I search contents for "whales" Then I should see "Last update:" within ".search-article-author-changes" Scenario: show date of last update from another author Given the following users | login | name | | sglaspell | Susan Glaspell | And the article "whales and dolphins" is updated by "Susan Glaspell" When I search contents for "whales" Then I should see "by Susan Glaspell at" within ".search-article-author-changes" Scenario: show basic info on blog search results Given the following blogs | owner | name | | joaosilva | JSilva blog | When I search contents for "JSilva" Then I should see "JSilva blog" within ".search-result-title" And The page should contain ".icon-content-blog" Scenario: show and link last posts on blog search results Given the following blogs | owner | name | | joaosilva | JSilva blog | And the following articles | owner | parent | name | | joaosilva | JSilva blog | post #1 | | joaosilva | JSilva blog | post #2 | | joaosilva | JSilva blog | post #4 | And the following rss feeds | joaosilva | JSilva blog | post #3 | When I search contents for "JSilva" Then I should see "Last posts" within ".search-blog-items" And I should see "post #1" And I should see "post #2" And I should not see "post #3" And I should see "post #4" When I follow "post #1" Then I should be on article "post #1" Scenario: show empty last posts on blog search results Given the following blogs | owner | name | | joaosilva | JSilva blog | When I search contents for "JSilva" Then I should see "None" within ".search-blog-items" Scenario: find enterprises without exact query When I go to the search articles page And I fill in "search-input" with "bees and" And I press "Search" Then I should see "bees and butterflies" within "#search-results" |