[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @mod @mod_wiki 2 Feature: Users can search wikis 3 In order to find information in wiki 4 As a user 5 I need to be able to search individual and collaborative wikis 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | teacher1 | Teacher | 1 | teacher1@example.com | 11 | student1 | Student | 1 | student1@example.com | 12 | student2 | Student | 2 | student2@example.com | 13 And the following "courses" exist: 14 | fullname | shortname | category | 15 | Course 1 | C1 | 0 | 16 And the following "course enrolments" exist: 17 | user | course | role | 18 | teacher1 | C1 | editingteacher | 19 | student1 | C1 | student | 20 | student2 | C1 | student | 21 22 @javascript 23 Scenario: Searching collaborative wiki 24 Given I log in as "teacher1" 25 And I follow "Course 1" 26 And I turn editing mode on 27 And I add a "Wiki" to section "1" and I fill the form with: 28 | Wiki name | Collaborative wiki name | 29 | Description | Collaborative wiki description | 30 | First page name | Collaborative index | 31 | Wiki mode | Collaborative wiki | 32 And I follow "Collaborative wiki name" 33 And I press "Create page" 34 And I set the following fields to these values: 35 | HTML format | Collaborative teacher1 page [[new page]] | 36 And I press "Save" 37 And I follow "Course 1" 38 And I log out 39 And I log in as "student1" 40 And I follow "Course 1" 41 And I follow "Collaborative wiki name" 42 And I follow "new page" 43 And I press "Create page" 44 And I set the following fields to these values: 45 | HTML format | New page created by student1 | 46 And I press "Save" 47 When I set the field "searchstring" to "page" 48 And I press "Search wikis" 49 Then I should see "New page created by student1" 50 And I should see "Collaborative teacher1 page" 51 And I set the field "searchstring" to "teacher1" 52 And I press "Search wikis" 53 And I should not see "New page created by student1" 54 And I should see "Collaborative teacher1 page" 55 And I set the field "searchstring" to "teacher1 page" 56 And I press "Search wikis" 57 And I should not see "New page created by student1" 58 And I should see "Collaborative teacher1 page" 59 And I log out 60 61 62 @javascript 63 Scenario: Searching individual wiki 64 Given I log in as "teacher1" 65 And I follow "Course 1" 66 And I turn editing mode on 67 And I add a "Wiki" to section "1" and I fill the form with: 68 | Wiki name | Individual wiki name | 69 | Description | Individual wiki description | 70 | First page name | Individual index | 71 | Wiki mode | Individual wiki | 72 And I follow "Individual wiki name" 73 And I press "Create page" 74 And I set the following fields to these values: 75 | HTML format | Individual teacher1 page | 76 And I press "Save" 77 And I log out 78 And I log in as "student1" 79 And I follow "Course 1" 80 And I follow "Individual wiki name" 81 And I press "Create page" 82 And I set the following fields to these values: 83 | HTML format | Individual student1 page | 84 And I press "Save" 85 When I set the field "searchstring" to "page" 86 And I press "Search wikis" 87 Then I should see "Individual student1 page" 88 And I should not see "Individual teacher1 page" 89 And I log out 90 And I log in as "student2" 91 And I follow "Course 1" 92 And I follow "Individual wiki name" 93 And I press "Create page" 94 And I set the following fields to these values: 95 | HTML format | Individual student2 page | 96 And I press "Save" 97 And I set the field "searchstring" to "page" 98 And I press "Search wikis" 99 And I should see "Individual student2 page" 100 And I should not see "Individual student1 page" 101 And I should not see "Individual teacher1 page" 102 And I log out 103 And I log in as "teacher1" 104 And I follow "Course 1" 105 And I follow "Individual wiki name" 106 And I set the field "searchstring" to "page" 107 And I press "Search wikis" 108 And I should see "Individual teacher1 page" 109 And I should not see "Individual student1 page" 110 And I should not see "Individual student2 page" 111 And I set the field "uid" to "Student 1" 112 And I should not see "Individual teacher1 page" 113 And I should see "Individual student1 page" 114 And I should not see "Individual student2 page" 115 And I set the field "uid" to "Student 2" 116 And I should not see "Individual teacher1 page" 117 And I should not see "Individual student1 page" 118 And I should see "Individual student2 page" 119 And I log out 120 121 @javascript 122 Scenario: Searching group wiki 123 Given the following "groups" exist: 124 | name | course | idnumber | 125 | Group1 | C1 | G1 | 126 | Group2 | C1 | G2 | 127 And the following "group members" exist: 128 | user | group | 129 | student1 | G1 | 130 | student2 | G2 | 131 And I log in as "teacher1" 132 And I follow "Course 1" 133 And I turn editing mode on 134 And I add a "Wiki" to section "1" and I fill the form with: 135 | Wiki name | Group wiki name | 136 | Description | Wiki description | 137 | First page name | Groups index | 138 | Wiki mode | Collaborative wiki | 139 | Group mode | Separate groups | 140 And I follow "Group wiki name" 141 And I set the field "Group" to "All participants" 142 And I press "Create page" 143 And I set the following fields to these values: 144 | HTML format | All participants teacher1 page | 145 And I press "Save" 146 And I set the field "group" to "Group1" 147 And I press "Create page" 148 And I set the following fields to these values: 149 | HTML format | Group1 teacher1 page [[new page1]] | 150 And I press "Save" 151 And I set the field "group" to "Group2" 152 And I press "Create page" 153 And I set the following fields to these values: 154 | HTML format | Group2 teacher1 page [[new page2]] | 155 And I press "Save" 156 And I log out 157 And I log in as "student1" 158 And I follow "Course 1" 159 And I follow "Group wiki name" 160 And I follow "new page1" 161 And I press "Create page" 162 And I set the following fields to these values: 163 | HTML format | Group1 student1 new page | 164 And I press "Save" 165 When I set the field "searchstring" to "page" 166 And I press "Search wikis" 167 Then I should see "Group1 teacher1 page" 168 And I should not see "Group2 teacher1 page" 169 And I should see "Group1 student1 new page" 170 And I should not see "All participants teacher1 page" 171 And I log out 172 And I log in as "student2" 173 And I follow "Course 1" 174 And I follow "Group wiki name" 175 And I follow "new page2" 176 And I press "Create page" 177 And I set the following fields to these values: 178 | HTML format | Group2 student2 new page | 179 And I press "Save" 180 And I set the field "searchstring" to "page" 181 And I press "Search wikis" 182 And I should not see "Group1 teacher1 page" 183 And I should see "Group2 teacher1 page" 184 And I should not see "Group1 student1 new page" 185 And I should see "Group2 student2 new page" 186 And I should not see "All participants teacher1 page" 187 And I log out 188 And I log in as "teacher1" 189 And I follow "Course 1" 190 And I follow "Group wiki name"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |