@@ -6,22 +6,20 @@ Feature: Use global search interface
66
77 Background :
88 Given the following config values are set as admin:
9- | enableglobalsearch | 1 |
10- | searchengine | solr |
9+ | enableglobalsearch | 1 |
10+ | searchengine | simpledb |
1111 And the following "courses" exist:
1212 | shortname | fullname |
1313 | F1 | Amphibians |
1414 And the following "activities" exist:
15- | activity | name | intro | course | idnumber |
16- | page | PageName1 | PageDesc1 | F1 | PAGE1 |
17- | forum | ForumName1 | ForumDesc1 | F1 | FORUM1 |
15+ | activity | name | intro | course | idnumber |
16+ | page | PageName1 frogs amphibians | PageDesc1 | F1 | PAGE1 |
17+ | forum | ForumName1 toads amphibians | ForumDesc1 | F1 | FORUM1 |
18+ And I update the global search index
1819 And I log in as "admin"
1920
2021 @javascript
2122 Scenario : Search from header search box with one result
22- Given global search expects the query "frogs" and will return:
23- | type | idnumber |
24- | activity | PAGE1 |
2523 When I search for "frogs" using the header global search box
2624 Then I should see "PageName1"
2725 And I should see "PageDesc1"
@@ -32,15 +30,9 @@ Feature: Use global search interface
3230
3331 @javascript
3432 Scenario : Search from search page with two results
35- Given global search expects the query "zombies" and will return:
36- | nothing |
3733 When I search for "zombies" using the header global search box
3834 Then I should see "No results"
39- And I set the field "id_q" to "Toads"
40- And global search expects the query "Toads" and will return:
41- | type | idnumber |
42- | activity | FORUM1 |
43- | activity | PAGE1 |
35+ And I set the field "id_q" to "amphibians"
4436 # You cannot press "Search" because there's a fieldset with the same name that gets in the way.
4537 And I press "id_submitbutton"
4638 And I should see "ForumName1"
@@ -54,19 +46,13 @@ Feature: Use global search interface
5446
5547 @javascript
5648 Scenario : Search starting from site context (no within option)
57- Given global search expects the query "frogs" and will return:
58- | type | idnumber |
59- | activity | PAGE1 |
6049 When I search for "frogs" using the header global search box
6150 And I expand all fieldsets
6251 Then I should not see "Search within"
6352 And I should see "Courses" in the "region-main" "region"
6453
6554 @javascript
6655 Scenario : Search starting from course context (within option lists course)
67- Given global search expects the query "frogs" and will return:
68- | type | idnumber |
69- | activity | PAGE1 |
7056 When I am on "Amphibians" course homepage
7157 And I search for "frogs" using the header global search box
7258 And I expand all fieldsets
@@ -78,9 +64,6 @@ Feature: Use global search interface
7864
7965 @javascript
8066 Scenario : Search starting from forum context (within option lists course and forum)
81- Given global search expects the query "frogs" and will return:
82- | type | idnumber |
83- | activity | PAGE1 |
8467 When I am on "Amphibians" course homepage
8568 And I follow "ForumName1"
8669 And I search for "frogs" using the header global search box
@@ -95,7 +78,10 @@ Feature: Use global search interface
9578
9679 @javascript
9780 Scenario : Check that groups option in search form appears when intended
98- Given the following "groups" exist:
81+ # Switch to mocked Solr search because simpledb doesn't support groups.
82+ Given the following config values are set as admin:
83+ | searchengine | solr |
84+ And the following "groups" exist:
9985 | name | course | idnumber |
10086 | A Group | F1 | G1 |
10187 | B Group | F1 | G2 |
0 commit comments