[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @block @block_calendar_month 2 Feature: Enable the calendar block in a course and test it's functionality 3 In order to enable the calendar block in a course 4 As a teacher 5 I can add the calendar 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 22 Scenario: Add the block to a the course 23 Given I log in as "teacher1" 24 And I follow "Course 1" 25 And I turn editing mode on 26 When I add the "Calendar" block 27 Then I should see "Events key" in the "Calendar" "block" 28 29 @javascript 30 Scenario: View a global event in the calendar block 31 Given I log in as "admin" 32 And I create a calendar event with form data: 33 | id_eventtype | Site | 34 | id_name | Site Event | 35 And I log out 36 When I log in as "teacher1" 37 And I follow "Course 1" 38 And I turn editing mode on 39 And I add the "Calendar" block 40 And I hover over today in the calendar 41 Then I should see "Site Event" 42 43 @javascript 44 Scenario: Filter site events in the calendar block 45 Given I log in as "admin" 46 And I create a calendar event with form data: 47 | id_eventtype | Site | 48 | id_name | Site Event | 49 And I log out 50 When I log in as "teacher1" 51 And I follow "Course 1" 52 And I turn editing mode on 53 And I add the "Calendar" block 54 And I create a calendar event with form data: 55 | id_eventtype | Course | 56 | id_name | Course Event | 57 And I follow "Course 1" 58 And I follow "Hide global events" 59 And I hover over today in the calendar 60 Then I should not see "Site Event" 61 And I should see "Course Event" 62 63 @javascript 64 Scenario: View a course event in the calendar block 65 Given I log in as "teacher1" 66 And I follow "Course 1" 67 And I turn editing mode on 68 And I add the "Calendar" block 69 And I create a calendar event with form data: 70 | id_eventtype | Course | 71 | id_name | Course Event | 72 When I follow "Course 1" 73 And I hover over today in the calendar 74 Then I should see "Course Event" 75 76 @javascript 77 Scenario: Filter course events in the calendar block 78 Given I log in as "teacher1" 79 And I follow "Course 1" 80 And I turn editing mode on 81 And I add the "Calendar" block 82 And I create a calendar event with form data: 83 | id_eventtype | Course | 84 | id_name | Course Event | 85 And I follow "Course 1" 86 And I create a calendar event with form data: 87 | id_eventtype | User | 88 | id_name | User Event | 89 When I click on "Dashboard" "link" in the "Navigation" "block" 90 And I follow "Course 1" 91 And I follow "Hide course events" 92 And I hover over today in the calendar 93 Then I should not see "Course Event" 94 And I should see "User Event" 95 96 @javascript 97 Scenario: View a user event in the calendar block 98 Given I log in as "teacher1" 99 And I follow "Course 1" 100 And I turn editing mode on 101 And I add the "Calendar" block 102 And I create a calendar event with form data: 103 | id_eventtype | User | 104 | id_name | User Event | 105 When I click on "Dashboard" "link" in the "Navigation" "block" 106 And I follow "Course 1" 107 And I hover over today in the calendar 108 Then I should see "User Event" 109 110 @javascript 111 Scenario: Filter user events in the calendar block 112 Given I log in as "teacher1" 113 And I follow "Course 1" 114 And I turn editing mode on 115 And I add the "Calendar" block 116 And I create a calendar event with form data: 117 | id_eventtype | Course | 118 | id_name | Course Event | 119 And I follow "Course 1" 120 And I create a calendar event with form data: 121 | id_eventtype | User | 122 | id_name | User Event | 123 When I click on "Dashboard" "link" in the "Navigation" "block" 124 And I follow "Course 1" 125 And I follow "Hide user events" 126 And I hover over today in the calendar 127 Then I should not see "User Event" 128 And I should see "Course Event" 129 130 @javascript 131 Scenario: View a group event in the calendar block 132 Given the following "groups" exist: 133 | name | course | idnumber | 134 | Group 1 | C1 | G1 | 135 | Group 2 | C1 | G2 | 136 And the following "group members" exist: 137 | user | group | 138 | student1 | G1 | 139 | student2 | G2 | 140 When I log in as "teacher1" 141 And I follow "Course 1" 142 And I navigate to "Edit settings" node in "Course administration" 143 And I set the following fields to these values: 144 | id_groupmode | Separate groups | 145 | id_groupmodeforce | Yes | 146 And I press "Save and display" 147 And I turn editing mode on 148 And I add the "Calendar" block 149 And I create a calendar event with form data: 150 | id_eventtype | Group | 151 | id_groupid | Group 1 | 152 | id_name | Group Event | 153 And I log out 154 Then I log in as "student1" 155 And I follow "Course 1" 156 And I hover over today in the calendar 157 And I should see "Group Event" 158 And I log out 159 And I log in as "student2" 160 And I follow "Course 1" 161 And I hover over today in the calendar 162 And I should not see "Group Event" 163 164 @javascript 165 Scenario: Filter group events in the calendar block 166 Given the following "groups" exist: 167 | name | course | idnumber | 168 | Group 1 | C1 | G1 | 169 | Group 2 | C1 | G2 | 170 And the following "group members" exist: 171 | user | group | 172 | student1 | G1 | 173 | student2 | G2 | 174 When I log in as "teacher1" 175 And I follow "Course 1" 176 And I navigate to "Edit settings" node in "Course administration" 177 And I set the following fields to these values: 178 | id_groupmode | Separate groups | 179 | id_groupmodeforce | Yes | 180 And I press "Save and display" 181 And I turn editing mode on 182 And I add the "Calendar" block 183 And I create a calendar event with form data: 184 | id_eventtype | Course | 185 | id_name | Course Event 1 | 186 And I follow "Course 1" 187 And I create a calendar event with form data: 188 | id_eventtype | Group | 189 | id_groupid | Group 1 | 190 | id_name | Group Event 1 | 191 And I log out 192 Then I log in as "student1" 193 And I follow "Course 1" 194 And I follow "Hide group events" 195 And I hover over today in the calendar 196 And I should not see "Group Event 1" 197 And I should see "Course Event 1"
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 |