[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/backup/util/ui/tests/behat/ -> backup_courses.feature (source)

   1  @core @core_backup
   2  Feature: Backup Moodle courses
   3    In order to save and store course contents
   4    As an admin
   5    I need to create backups of courses
   6  
   7    Background:
   8      Given the following "courses" exist:
   9        | fullname | shortname | category | numsections |
  10        | Course 1 | C1 | 0 | 10 |
  11        | Course 2 | C2 | 0 | 2 |
  12      And the following "activities" exist:
  13        | activity | course | idnumber | name | intro | section |
  14        | assign | C2 | assign1 | Test assign | Assign description | 1 |
  15        | data | C2 | data1 | Test data | Database description | 2 |
  16      And I log in as "admin"
  17  
  18    Scenario: Backup a course providing options
  19      When I backup "Course 1" course using this options:
  20        | Confirmation | Filename | test_backup.mbz |
  21      Then I should see "Restore"
  22      And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
  23      And I should see "URL of backup"
  24      And I should see "Anonymize user information"
  25  
  26    Scenario: Backup a course with default options
  27      When I backup "Course 1" course using this options:
  28        | Initial | Include calendar events | 0 |
  29        | Initial | Include course logs | 1 |
  30        | Schema | Topic 5 | 0 |
  31        | Confirmation | Filename | test_backup.mbz |
  32      Then I should see "Restore"
  33      And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
  34      And I should not see "Section 3"
  35      And I press "Continue"
  36      And I click on "Continue" "button" in the ".bcs-current-course" "css_element"
  37      And "//div[contains(concat(' ', normalize-space(@class), ' '), ' fitem ')][contains(., 'Include calendar events')]/descendant::img" "xpath_element" should exist
  38      And "Include course logs" "checkbox" should exist
  39      And I press "Next"
  40  
  41    Scenario: Backup a course without blocks
  42      When I backup "Course 1" course using this options:
  43        | 1 | setting_root_blocks | 0 |
  44      Then I should see "Course backup area"
  45  
  46    Scenario: Backup selecting just one section
  47      When I backup "Course 2" course using this options:
  48        | Schema | Test data | 0 |
  49        | Schema | Topic 2 | 0 |
  50        | Confirmation | Filename | test_backup.mbz |
  51      Then I should see "Course backup area"
  52      And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
  53      And I should not see "Section 2"
  54      And I press "Continue"
  55      And I click on "Continue" "button" in the ".bcs-current-course" "css_element"
  56      And I press "Next"
  57      And I should see "Test assign"
  58      And I should not see "Test data"
  59  
  60    Scenario: Backup a course using the one click backup button
  61      When I perform a quick backup of course "Course 2"
  62      Then I should see "Restore course"
  63      And I should see "Course backup area"
  64      And I should see "backup-moodle2-course-"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1