[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @block @block_blog_menu 2 Feature: Enable Block blog menu in a course 3 In order to enable the blog menu in a course 4 As a teacher 5 I can add blog menu block to a course 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | idnumber | 10 | teacher1 | Teacher | 1 | teacher1@example.com | T1 | 11 | student1 | Student | 1 | student1@example.com | S1 | 12 | student2 | Student | 2 | student2@example.com | S2 | 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 And I log in as "teacher1" 22 And I follow "Course 1" 23 And I turn editing mode on 24 And I add the "Blog menu" block 25 And I log out 26 27 Scenario: Students use the blog menu block to post blogs 28 Given I log in as "student1" 29 And I follow "Course 1" 30 And I follow "Add a new entry" 31 When I set the following fields to these values: 32 | Entry title | S1 First Blog | 33 | Blog entry body | This is my awesome blog! | 34 And I press "Save changes" 35 Then I should see "S1 First Blog" 36 And I should see "This is my awesome blog!" 37 And I follow "Dashboard" 38 And I follow "Course 1" 39 And I follow "Blog entries" 40 And I should see "S1 First Blog" 41 And I should see "This is my awesome blog!" 42 43 Scenario: Students use the blog menu block to view their blogs about the course 44 Given I log in as "student1" 45 And I follow "Course 1" 46 And I follow "Add an entry about this course" 47 And I set the following fields to these values: 48 | Entry title | S1 First Blog | 49 | Blog entry body | This is my awesome blog about this course! | 50 And I press "Save changes" 51 And I should see "S1 First Blog" 52 And I should see "This is my awesome blog about this course!" 53 And I should see "Associated Course: C1" 54 And I log out 55 And I log in as "student2" 56 And I follow "Course 1" 57 And I follow "Add a new entry" 58 And I set the following fields to these values: 59 | Entry title | S2 Second Blog | 60 | Blog entry body | My unrelated blog! | 61 And I press "Save changes" 62 And I should see "S2 Second Blog" 63 And I should see "My unrelated blog!" 64 And I should not see "Associated Course: C1" 65 And I follow "Dashboard" 66 And I follow "Course 1" 67 And I follow "Add an entry about this course" 68 And I set the following fields to these values: 69 | Entry title | S2 First Blog | 70 | Blog entry body | My course blog is better! | 71 And I press "Save changes" 72 And I should see "S2 First Blog" 73 And I should see "My course blog is better!" 74 And I should see "Associated Course: C1" 75 And I follow "Dashboard" 76 And I follow "Course 1" 77 When I follow "View my entries about this course" 78 Then I should see "S2 First Blog" 79 And I should not see "S2 Second Blog" 80 And I should not see "S1 First Blog" 81 82 Scenario: Students use the blog menu block to view all blogs about the course 83 Given I log in as "student1" 84 And I follow "Course 1" 85 And I follow "Add an entry about this course" 86 And I set the following fields to these values: 87 | Entry title | S1 First Blog | 88 | Blog entry body | This is my awesome blog about this course! | 89 And I press "Save changes" 90 And I should see "S1 First Blog" 91 And I should see "This is my awesome blog about this course!" 92 And I should see "Associated Course: C1" 93 And I log out 94 And I log in as "student2" 95 And I follow "Course 1" 96 And I follow "Add a new entry" 97 And I set the following fields to these values: 98 | Entry title | S2 Second Blog | 99 | Blog entry body | My unrelated blog! | 100 And I press "Save changes" 101 And I should see "S2 Second Blog" 102 And I should see "My unrelated blog!" 103 And I should not see "Associated Course: C1" 104 And I follow "Dashboard" 105 And I follow "Course 1" 106 And I follow "Add an entry about this course" 107 And I set the following fields to these values: 108 | Entry title | S2 First Blog | 109 | Blog entry body | My course blog is better! | 110 And I press "Save changes" 111 And I should see "S2 First Blog" 112 And I should see "My course blog is better!" 113 And I should see "Associated Course: C1" 114 And I follow "Dashboard" 115 And I follow "Course 1" 116 When I follow "View all entries for this course" 117 Then I should see "S1 First Blog" 118 And I should see "S2 First Blog" 119 And I should not see "S2 Second Blog" 120 121 Scenario: Students use the blog menu block to view all their blog entries 122 Given I log in as "student1" 123 And I follow "Course 1" 124 And I follow "Add an entry about this course" 125 And I set the following fields to these values: 126 | Entry title | S1 First Blog | 127 | Blog entry body | This is my awesome blog about this course! | 128 And I press "Save changes" 129 And I should see "S1 First Blog" 130 And I should see "This is my awesome blog about this course!" 131 And I should see "Associated Course: C1" 132 And I log out 133 And I log in as "student2" 134 And I follow "Course 1" 135 And I follow "Add a new entry" 136 And I set the following fields to these values: 137 | Entry title | S2 Second Blog | 138 | Blog entry body | My unrelated blog! | 139 And I press "Save changes" 140 And I should see "S2 Second Blog" 141 And I should see "My unrelated blog!" 142 And I should not see "Associated Course: C1" 143 And I follow "Dashboard" 144 And I follow "Course 1" 145 And I follow "Add an entry about this course" 146 And I set the following fields to these values: 147 | Entry title | S2 First Blog | 148 | Blog entry body | My course blog is better! | 149 And I press "Save changes" 150 And I should see "S2 First Blog" 151 And I should see "My course blog is better!" 152 And I should see "Associated Course: C1" 153 And I follow "Dashboard" 154 And I follow "Course 1" 155 When I follow "Blog entries" 156 Then I should see "S2 First Blog" 157 And I should see "S2 Second Blog" 158 And I should not see "S1 First Blog" 159 160 Scenario: Teacher searches for student blogs 161 Given I log in as "student1" 162 And I follow "Course 1" 163 And I follow "Add an entry about this course" 164 And I set the following fields to these values: 165 | Entry title | S1 First Blog | 166 | Blog entry body | This is my awesome blog about this course! | 167 And I press "Save changes" 168 And I should see "S1 First Blog" 169 And I should see "This is my awesome blog about this course!" 170 And I should see "Associated Course: C1" 171 And I log out 172 And I log in as "student2" 173 And I follow "Course 1" 174 And I follow "Add a new entry" 175 And I set the following fields to these values: 176 | Entry title | S2 Second Blog | 177 | Blog entry body | My unrelated blog! | 178 And I press "Save changes" 179 And I should see "S2 Second Blog" 180 And I should see "My unrelated blog!" 181 And I should not see "Associated Course: C1" 182 And I follow "Dashboard" 183 And I follow "Course 1" 184 And I follow "Add an entry about this course" 185 And I set the following fields to these values: 186 | Entry title | S2 First Blog | 187 | Blog entry body | My course blog is better! | 188 And I press "Save changes" 189 And I should see "S2 First Blog" 190 And I should see "My course blog is better!" 191 And I should see "Associated Course: C1" 192 And I log out 193 When I log in as "teacher1" 194 And I follow "Course 1" 195 And I set the field "blogsearchquery" to "First" 196 And I press "Search" 197 Then I should see "S1 First Blog" 198 And I should see "S2 First Blog" 199 And I should not see "S2 Second Blog"
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 |