Skip to content

Commit

Permalink
MDL-43835 behat: Fixed backup behat test
Browse files Browse the repository at this point in the history
Disabling section, disables all checkboxes in section,
So we don't have to unset them manually
  • Loading branch information
Rajesh Taneja committed Jun 25, 2014
1 parent 955118d commit 11f69d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions backup/util/ui/tests/behat/backup_courses.feature
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ Feature: Backup Moodle courses
When I backup "Course 1" course using this options:
| Initial | Include calendar events | 0 |
| Initial | Include course logs | 1 |
| Schema | setting_section_section_5_userinfo | 0 |
| Schema | setting_section_section_5_included | 0 |
| Schema | Topic 5 | 0 |
| Confirmation | Filename | test_backup.mbz |
Then I should see "Restore"
And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
Expand All @@ -50,10 +49,8 @@ Feature: Backup Moodle courses
@javascript
Scenario: Backup selecting just one section
When I backup "Course 2" course using this options:
| Schema | setting_section_section_2_userinfo | 0 |
| Schema | setting_section_section_2_userinfo | 0 |
| Schema | setting_section_section_4_included | 0 |
| Schema | setting_section_section_4_included | 0 |
| Schema | Test data | 0 |
| Schema | Topic 2 | 0 |
| Confirmation | Filename | test_backup.mbz |
Then I should see "Course backup area"
And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
Expand Down
9 changes: 3 additions & 6 deletions backup/util/ui/tests/behat/restore_moodle2_courses.feature
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ Feature: Restore Moodle 2 course backups
When I backup "Course 3" course using this options:
| Confirmation | Filename | test_backup.mbz |
And I restore "test_backup.mbz" backup into "Course 2" course using this options:
| Schema | setting_section_section_3_included | 0 |
| Schema | setting_section_section_3_userinfo | 0 |
| Schema | setting_section_section_5_included | 0 |
| Schema | setting_section_section_5_userinfo | 0 |
| Schema | Test database name | 0 |
| Schema | Section 2 | 0 |
Then I should see "Course 2"
And I should see "Test assign name"
And I should not see "Test database name"
Expand All @@ -70,8 +68,7 @@ Feature: Restore Moodle 2 course backups
| Description | Test forum post backup description |
And I follow "Restore"
And I merge "test_backup.mbz" backup into the current course after deleting it's contents using this options:
| Schema | setting_section_section_8_userinfo | 0 |
| Schema | setting_section_section_8_included | 0 |
| Schema | Section 3 | 0 |
Then I should see "Course 1"
And I should not see "Section 3"
And I should not see "Test forum post backup name"
Expand Down

0 comments on commit 11f69d4

Please sign in to comment.