Merge branch 'MDL-42363_master' of git://github.com/dmonllao/moodle

This commit is contained in:
Dan Poltawski 2013-11-04 23:34:18 +08:00
commit dcc08e55b5
2 changed files with 42 additions and 8 deletions

View File

@ -6,8 +6,13 @@ Feature: Backup Moodle courses
Background:
Given the following "courses" exists:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| fullname | shortname | category | numsections |
| Course 1 | C1 | 0 | 10 |
| Course 2 | C2 | 0 | 2 |
And the following "activities" exists:
| activity | course | idnumber | name | intro | section |
| assign | C2 | assign1 | Test assign | Assign description | 1 |
| data | C2 | data1 | Test data | Database description | 2 |
And I log in as "admin"
@javascript
@ -36,3 +41,26 @@ Feature: Backup Moodle courses
And I check "Include course logs"
And I press "Cancel"
And I click on "Cancel" "button" in the "Cancel backup" "dialogue"
@javascript
Scenario: Backup a course without blocks
When I backup "Course 1" course using this options:
| id_setting_root_blocks | 0 |
Then I should see "Course backup area"
@javascript
Scenario: Backup selecting just one section
When I backup "Course 2" course using this options:
| Filename | test_backup.mbz |
| setting_section_section_2_userinfo | 0 |
| setting_section_section_2_included | 0 |
| setting_section_section_4_userinfo | 0 |
| setting_section_section_4_included | 0 |
Then I should see "Course backup area"
And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
And I should not see "Section 2"
And I press "Continue"
And I click on "Continue" "button" in the ".bcs-current-course" "css_element"
And I press "Next"
And I should see "Test assign"
And I should not see "Test data"

View File

@ -9,6 +9,11 @@ Feature: Restore Moodle 2 course backups
| fullname | shortname | category | format | numsections | coursedisplay |
| Course 1 | C1 | 0 | topics | 15 | 1 |
| Course 2 | C2 | 0 | topics | 5 | 0 |
| Course 3 | C3 | 0 | topics | 2 | 0 |
And the following "activities" exists:
| activity | course | idnumber | name | intro | section |
| assign | C3 | assign1 | Test assign name | Assign description | 1 |
| data | C3 | data1 | Test database name | Database description | 2 |
And I log in as "admin"
And I follow "Course 1"
And I turn editing mode on
@ -44,15 +49,16 @@ Feature: Restore Moodle 2 course backups
@javascript
Scenario: Restore a backup into the same course
When I backup "Course 1" course using this options:
When I backup "Course 3" course using this options:
| Filename | test_backup.mbz |
And I merge "test_backup.mbz" backup into the current course using this options:
And I restore "test_backup.mbz" backup into "Course 2" course using this options:
| setting_section_section_3_included | 0 |
| setting_section_section_3_userinfo | 0 |
| setting_section_section_5_included | 0 |
| setting_section_section_5_userinfo | 0 |
Then I should see "Course 1"
And I should not see "Section 3"
And I should see "Community finder" in the "Community finder" "block"
And I should see "Test forum name"
Then I should see "Course 2"
And I should see "Test assign name"
And I should not see "Test database name"
@javascript
Scenario: Restore a backup into the same course removing it's contents before that