MDL-38688 behat: Backup tests
[moodle.git] / backup / util / ui / tests / behat / backup_courses.feature
CommitLineData
52e8f537
DM
1@backup
2Feature: Backup Moodle courses
3 In order to save and store course contents
4 As a moodle admin
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:
16 Then I should see "Restore"
17 And I click on "Restore" "link" in the ".backup-files-table" "css_element"
18 And I should see "URL of backup"
19 And I should see "Anonymize user information"
20
21 @javascript
22 Scenario: Backup a course with default options
23 When I backup "Course 1" course using this options:
24 | Filename | test_backup.mbz |
25 | Include calendar events | 0 |
26 | Include course logs | 1 |
27 | setting_section_section_5_userinfo | 0 |
28 | setting_section_section_5_included | 0 |
29 Then I should see "Restore"
30 And I click on "Restore" "link" in the ".backup-files-table" "css_element"
31 And I should not see "Section 3"
32 And I press "Continue"
33 And I click on "Continue" "button" in the ".bcs-current-course" "css_element"
34 And I click on "//div[contains(concat(' ', @class, ' '), ' fitem ')][contains(., 'Include calendar events')]/descendant::img" "xpath_element"
35 And I click on "setting_root_logs" "checkbox" in the "//div[contains(@class, 'fitem')][contains(., 'Include course logs')]" "xpath_element"
36 And I press "Cancel"
37 And I click on "Cancel" "button" in the ".confirmation-dialogue" "css_element"