weekly on-sync release 5.0dev
[moodle.git] / grade / tests / behat / grade_letter_boundary_20160518.feature
bloba984da8d62b4dc8d60bd1230e9764464e28b8272
1 @core @core_grades
2 Feature: We can customise the letter boundary of a course in gradebook version 20160518.
3   In order to change the letter boundary of a course
4   As a teacher
5   I need to add assessments to the gradebook.
7   @javascript
8   Scenario: I edit the letter boundaries of a course and grade a student.
9     Given the following "courses" exist:
10       | fullname | shortname | category |
11       | Course 1 | C1 | 0 |
12     And gradebook calculations for the course "C1" are frozen at version "20160518"
13     And the following "users" exist:
14       | username | firstname | lastname | email | idnumber | alternatename |
15       | teacher1 | Teacher | 1 | teacher1@example.com | t1 | Terry         |
16       | student1 | Student | 1 | student1@example.com | s1 | Sally         |
17     And the following "course enrolments" exist:
18       | user | course | role |
19       | teacher1 | C1 | editingteacher |
20       | student1 | C1 | student |
21     And the following "activities" exist:
22       | activity | course | idnumber | name | intro | grade |
23       | assign | C1 | a1 | Test assignment one | Submit something! | 100 |
24     And I am on the "Course 1" "grades > course grade settings" page logged in as "teacher1"
25     And I set the following fields to these values:
26       | Grade display type | Letter |
27     And I press "Save changes"
28     And I navigate to "More > Grade letters" in the course gradebook
29     And I click on "Edit" "button"
30     And I set the following fields to these values:
31       | Override site defaults   | 1  |
32       | Letter grade boundary 10 | 57 |
33     And I press "Save changes"
34     And I navigate to "View > Grader report" in the course gradebook
35     And I turn editing mode on
36     And I give the grade "57" to the user "Student 1" for the grade item "Test assignment one"
37     And I press "Save changes"
38     And I am on "Course 1" course homepage with editing mode off
39     And I navigate to "View > Grader report" in the course gradebook
40     Then the following should exist in the "user-grades" table:
41       | -1-       |  -2-                    | -3- | -4- |
42       | Student 1 |  student1@example.com   | F   | F   |