Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_course @core_courseformat
2
Feature: Duplicate a section
3
  In order to set up my course contents quickly
4
  As a teacher
5
  I need to duplicate sections inside the same course
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category | enablecompletion | numsections | initsections |
10
      | Course 1 | C1        | 0        | 1                | 1           | 0            |
11
      | Course 2 | C2        | 0        | 1                | 4           | 1            |
12
    And the following "activities" exist:
13
      | activity | name                | intro                       | course | idnumber | section |
14
      | assign   | Activity sample 1.1 | Test assignment description | C1     | sample11 | 1       |
15
      | book     | Activity sample 1.2 | Test book description       | C1     | sample12 | 1       |
16
      | assign   | Activity sample 2.1 | Test assignment description | C2     | sample21 | 1       |
17
      | book     | Activity sample 2.2 | Test book description       | C2     | sample22 | 1       |
18
      | choice   | Activity sample 2.3 | Test choice description     | C2     | sample23 | 2       |
19
    And I log in as "admin"
20
 
21
  @javascript
22
  Scenario: Duplicate unnamed section
23
    Given I am on "Course 1" course homepage with editing mode on
24
    When I open section "1" edit menu
25
    And I click on "Duplicate" "link" in the "New section" "section"
26
    # The duplicated section has section number 2.
27
    And I am on the "Course 1 > Section 2" "course > section" page
28
    Then I should see "Activity sample 1.2"
29
    And I should see "New section"
30
 
31
  @javascript
32
  Scenario: Duplicate a named section
33
    Given I am on "Course 2" course homepage with editing mode on
34
    And I set the field "Edit section name" in the "Section 1" "section" to "New name"
35
    And I should see "New name" in the "New name" "section"
36
    When I open section "1" edit menu
37
    And I click on "Duplicate" "link" in the "New name" "section"
38
    Then I should see "Activity sample 2.2" in the "New name (copy)" "section"