1 |
efrain |
1 |
@block @block_calendar_upcoming
|
|
|
2 |
Feature: Enable the upcoming events block in a course
|
|
|
3 |
In order to enable the calendar block in a course
|
|
|
4 |
As a teacher
|
|
|
5 |
I can view the event in the upcoming events block
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email | idnumber |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname | category |
|
|
|
13 |
| Course 1 | C1 | 0 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
And the following "blocks" exist:
|
|
|
18 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
|
|
19 |
| calendar_upcoming | System | 1 | my-index | side-post |
|
|
|
20 |
|
|
|
21 |
@javascript
|
|
|
22 |
Scenario: View a site event in the calendar block
|
|
|
23 |
Given I log in as "admin"
|
|
|
24 |
And I create a calendar event with form data:
|
|
|
25 |
| id_eventtype | Site |
|
|
|
26 |
| id_name | My Site Event |
|
|
|
27 |
And I log out
|
|
|
28 |
When I log in as "teacher1"
|
|
|
29 |
Then I should see "My Site Event" in the "Upcoming events" "block"
|