Merge branch 'MDL-59538-master' of git://github.com/junpataleta/moodle
[moodle.git] / calendar / tests / behat / calendar_import.feature
CommitLineData
c3feaf26
SB
1@core @core_calendar @_file_upload @javascript
2Feature: Import and edit calendar events
3 In order to manipulate imported calendar events
4 As an user
5 I need to import calendar events then edit them.
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
18 Scenario: Import then edit a calendar event.
19 Given I log in as "teacher1"
20 And I view the calendar for "1" "2016"
21 And I press "Manage subscriptions"
22 And I set the following fields to these values:
23 | Calendar name | Test Import |
24 | Import from | Calendar file (.ics) |
25 | Type of event | User events |
26 And I upload "calendar/tests/fixtures/import.ics" file to "Calendar file (.ics)" filemanager
27 And I press "Add"
28 And I should see "Events imported: 2"
29 And I view the calendar for "2" "2017"
30 And I should see "February 2017"
31 And I should see "Event on 2-15-2017"
32 And I should see "Event on 2-25-2017"
33 And I follow "Event on 2-15-2017"
52380c82 34 And I should see "Event source: Test Import"