Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_backup
2
Feature: Duplicate activities
3
  In order to set up my course contents quickly
4
  As a teacher
5
  I need to duplicate activities inside the same course
6
 
7
  Scenario: Duplicate an activity
8
    Given the following "course" exists:
9
      | fullname     | Course 1 |
10
      | shortname    | C1       |
11
      | category     | 0        |
12
      | initsections | 1        |
13
    And the following "users" exist:
14
      | username | firstname | lastname | email |
15
      | teacher1 | Teacher | 1 | teacher1@example.com |
16
    And the following "course enrolments" exist:
17
      | user | course | role |
18
      | teacher1 | C1 | editingteacher |
19
    And the following "activities" exist:
20
      | activity | name               | intro                     | course | idnumber   | section |
21
      | data     | Test database name | Test database description | C1     | database1  | 1       |
22
    And the following config values are set as admin:
23
      | backup_import_activities | 0 | backup |
1441 ariadna 24
    And the following "core_badges > Badges" exist:
25
      | name            | course | description       | image                        | status | type |
26
      | My course badge | C1     | Badge description | badges/tests/behat/badge.png | active | 2    |
27
    And the following "core_badges > Criterias" exist:
28
      | badge             | role           |
29
      | My course badge   | editingteacher |
1 efrain 30
    And I log in as "teacher1"
31
    And I am on "Course 1" course homepage with editing mode on
32
    And I duplicate "Test database name" activity
33
    And I should see "Test database name (copy)"
34
    And I wait until section "1" is available
35
    And I click on "Edit settings" "link" in the "Test database name" activity
36
    And I set the following fields to these values:
37
      | Name | Original database name |
38
    And I press "Save and return to course"
39
    And I click on "Edit settings" "link" in the "Test database name (copy)" activity
40
    And I set the following fields to these values:
41
      | Name | Duplicated database name |
42
      | Description | Duplicated database description |
43
    And I press "Save and return to course"
44
    Then I should see "Original database name" in the "Section 1" "section"
45
    And I should see "Duplicated database name" in the "Section 1" "section"
46
    And "Original database name" "link" should appear before "Duplicated database name" "link"
1441 ariadna 47
    # Check that badges are not duplicated. If they are duplicated, they will appear as "Not available".
48
    And I navigate to "Badges" in current page administration
49
    And the following should not exist in the "reportbuilder-table" table:
50
      | Name             | Badge status  |
51
      | My course badge  | Not available |