Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_grades @javascript
2
Feature: We can duplicate grade items that already exist.
3
  In order to quickly create grade items that have similar settings.
4
  As a teacher
5
  I need to duplicate an existing grade item and check that its values are properly duplicated.
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | format |
10
      | Course 1 | C1 | topics |
11
    And the following "grade categories" exist:
12
      | fullname  | course |
13
      | Category1 | C1     |
14
    And the following "activities" exist:
15
      | activity | course | idnumber | name        | gradecategory |
16
      | assign   | C1     | a1       | Assignment1 | Category1     |
17
    And the following "users" exist:
18
      | username | firstname | lastname | email |
19
      | teacher1 | Teacher | 1 | teacher1@example.com |
20
    And the following "course enrolments" exist:
21
      | user | course | role |
22
      | teacher1 | C1 | editingteacher |
23
    And the following "grade items" exist:
24
      | itemname | course | category  | idnumber | gradetype | grademax | grademin | gradepass | display | decimals | hidden | weightoverride |
25
      | Item1    | C1     | Category1 | 001      | Value     | 80.00    | 5.00     | 40.00     | 1       | 1        | 0      | 1              |
26
 
27
  Scenario: Ensure the duplicated grade item settings match the original grade item
28
    Given I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1"
29
    And I should not see "Duplicate   Category1"
30
    And I should not see "Duplicate   Assignment1"
31
    When I duplicate the grade item "Item1"
32
    Then I should see "Item1 (copy)"
33
    And I click on grade item menu "Item1 (copy)" of type "gradeitem" on "setup" page
34
    And I choose "Edit grade item" in the open action menu
35
    And I click on "Show more..." "link" in the ".modal-dialog" "css_element"
36
    And the field "Item name" matches value "Item1 (copy)"
37
    And the field "ID number" matches value ""
38
    And the field "Grade type" matches value "Value"
39
    And the field "Maximum grade" matches value "80.00"
40
    And the field "Minimum grade" matches value "5.00"
41
    And the field "Grade to pass" matches value "40.00"
42
    And the field "Grade display type" matches value "Real"
43
    And the field "Overall decimal places" matches value "1"
44
    And the field "Hidden" matches value "0"
45
    And the field "Weight adjusted" matches value "1"