[ Index ]

PHP Cross Reference of moodle-2.8

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    @javascript
  19    Scenario: Backup a course providing options
  20      When I backup "Course 1" course using this options:
  21        | Confirmation | Filename | test_backup.mbz |
  22      Then I should see "Restore"
  23      And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
  24      And I should see "URL of backup"
  25      And I should see "Anonymize user information"
  26  
  27    @javascript
  28    Scenario: Backup a course with default options
  29      When I backup "Course 1" course using this options:
  30        | Initial | Include calendar events | 0 |
  31        | Initial | Include course logs | 1 |
  32        | Schema | Topic 5 | 0 |
  33        | Confirmation | Filename | test_backup.mbz |
  34      Then I should see "Restore"
  35      And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
  36      And I should not see "Section 3"
  37      And I press "Continue"
  38      And I click on "Continue" "button" in the ".bcs-current-course" "css_element"
  39      And "//div[contains(concat(' ', normalize-space(@class), ' '), ' fitem ')][contains(., 'Include calendar events')]/descendant::img" "xpath_element" should exist
  40      And "Include course logs" "checkbox" should exist
  41      And I press "Next"
  42  
  43    @javascript
  44    Scenario: Backup a course without blocks
  45      When I backup "Course 1" course using this options:
  46        | 1 | setting_root_blocks | 0 |
  47      Then I should see "Course backup area"
  48  
  49    @javascript
  50    Scenario: Backup selecting just one section
  51      When I backup "Course 2" course using this options:
  52        | Schema | Test data | 0 |
  53        | Schema | Topic 2 | 0 |
  54        | Confirmation | Filename | test_backup.mbz |
  55      Then I should see "Course backup area"
  56      And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
  57      And I should not see "Section 2"
  58      And I press "Continue"
  59      And I click on "Continue" "button" in the ".bcs-current-course" "css_element"
  60      And I press "Next"
  61      And I should see "Test assign"
  62      And I should not see "Test data"
  63  
  64    @javascript
  65    Scenario: Backup a course using the one click backup button
  66      When I perform a quick backup of course "Course 2"
  67      Then I should see "Restore course"
  68      And I should see "Course backup area"
  69      And I should see "backup-moodle2-course-"


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1