mirrored from git://git.moodle.org/moodle.git
/
export.feature
71 lines (64 loc) · 3.11 KB
/
export.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
@core @core_calendar
Feature: Export calendar events
In order to be able to use my calendar events outside of Moodle
As a user
I need to export calendar events in iCalendar format
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist:
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
And I log in as "student1"
Scenario: Viewing calendar export options
Given I follow "Full calendar"
When I click on "Import or export calendars" "link"
And I click on "Export calendar" "button"
Then I should see "All events"
And I should see "Events related to courses"
And I should see "Events related to groups"
And I should see "My personal events"
Scenario: Generating calendar URL for all events
Given I follow "Full calendar"
And I click on "Import or export calendars" "link"
And I click on "Export calendar" "button"
And I set the field "All events" to "1"
And I set the field "Recent and next 60 days" to "1"
When I click on "Get calendar URL" "button"
Then the "value" attribute of "Calendar URL" "field" should contain "&preset_what=all&"
Scenario: Generating calendar URL for course events
Given I follow "Full calendar"
And I click on "Import or export calendars" "link"
And I click on "Export calendar" "button"
And I set the field "Events related to courses" to "1"
And I set the field "Recent and next 60 days" to "1"
When I click on "Get calendar URL" "button"
Then the "value" attribute of "Calendar URL" "field" should contain "&preset_what=courses&"
Scenario: Generating calendar URL for group events
Given I follow "Full calendar"
And I click on "Import or export calendars" "link"
And I click on "Export calendar" "button"
And I set the field "Events related to groups" to "1"
And I set the field "Recent and next 60 days" to "1"
When I click on "Get calendar URL" "button"
Then the "value" attribute of "Calendar URL" "field" should contain "&preset_what=groups&"
Scenario: Generating calendar URL for category events
Given I follow "Full calendar"
And I click on "Import or export calendars" "link"
And I click on "Export calendar" "button"
And I set the field "Events related to categories" to "1"
And I set the field "Recent and next 60 days" to "1"
When I click on "Get calendar URL" "button"
Then the "value" attribute of "Calendar URL" "field" should contain "&preset_what=categories&"
Scenario: Generating calendar URL for user events
Given I follow "Full calendar"
And I click on "Import or export calendars" "link"
And I click on "Export calendar" "button"
And I set the field "My personal events" to "1"
And I set the field "Recent and next 60 days" to "1"
When I click on "Get calendar URL" "button"
Then the "value" attribute of "Calendar URL" "field" should contain "&preset_what=user&"