on-demand release 2.6beta+
[moodle.git] / backup / util / ui / tests / behat / backup_courses.feature
CommitLineData
550d842e 1@core @core_backup
52e8f537
DM
2Feature: Backup Moodle courses
3 In order to save and store course contents
5d7b6307 4 As an admin
52e8f537
DM
5 I need to create backups of courses
6
7 Background:
8 Given the following "courses" exists:
9 | fullname | shortname | category |
10 | Course 1 | C1 | 0 |
11 And I log in as "admin"
12
13 @javascript
14 Scenario: Backup a course providing options
15 When I backup "Course 1" course using this options:
fcc0b5b9 16 | Filename | test_backup.mbz |
52e8f537 17 Then I should see "Restore"
fcc0b5b9 18 And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
52e8f537
DM
19 And I should see "URL of backup"
20 And I should see "Anonymize user information"
21
22 @javascript
23 Scenario: Backup a course with default options
24 When I backup "Course 1" course using this options:
25 | Filename | test_backup.mbz |
26 | Include calendar events | 0 |
27 | Include course logs | 1 |
28 | setting_section_section_5_userinfo | 0 |
29 | setting_section_section_5_included | 0 |
30 Then I should see "Restore"
fcc0b5b9 31 And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
52e8f537
DM
32 And I should not see "Section 3"
33 And I press "Continue"
34 And I click on "Continue" "button" in the ".bcs-current-course" "css_element"
38976081
DM
35 And "//div[contains(concat(' ', normalize-space(@class), ' '), ' fitem ')][contains(., 'Include calendar events')]/descendant::img" "xpath_element" should exists
36 And I check "Include course logs"
52e8f537 37 And I press "Cancel"
fcc0b5b9 38 And I click on "Cancel" "button" in the "Cancel backup" "dialogue"