1 |
efrain |
1 |
@core @core_calendar @javascript
|
|
|
2 |
Feature: Limit displayed upcoming events
|
|
|
3 |
In order to filter what is displayed on the calendar
|
|
|
4 |
As a user
|
|
|
5 |
I need to interact with the calendar
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | teacher | 1 | teacher1@example.com |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname | format |
|
|
|
13 |
| Course 1 | C1 | topics |
|
|
|
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_month | Course | C1 | course-view-* | side-pre |
|
|
|
20 |
| calendar_upcoming | Course | C1 | course-view-* | side-pre |
|
|
|
21 |
And I log in as "teacher1"
|
|
|
22 |
|
|
|
23 |
Scenario: I view calendar details for a future event
|
|
|
24 |
Given I am on "Course 1" course homepage with editing mode on
|
|
|
25 |
And I follow "Course calendar"
|
|
|
26 |
And I click on "a.next" "css_element"
|
|
|
27 |
And I click on "a.next" "css_element"
|
|
|
28 |
When I create a calendar event:
|
|
|
29 |
| Type of event | course |
|
|
|
30 |
| Course | Course 1 |
|
|
|
31 |
| Event title | Two months away event |
|
|
|
32 |
And I am on "Course 1" course homepage
|
|
|
33 |
Then I should not see "Two months away event"
|
|
|
34 |
And I am on site homepage
|
|
|
35 |
And I follow "Preferences" in the user menu
|
|
|
36 |
And I follow "Calendar preferences"
|
|
|
37 |
When I set the following fields to these values:
|
|
|
38 |
| Upcoming events look-ahead | 3 months |
|
|
|
39 |
And I press "Save changes"
|
|
|
40 |
And I wait to be redirected
|
|
|
41 |
And I am on "Course 1" course homepage
|
|
|
42 |
Then I should see "Two months away event"
|