Skip to content
Permalink
Browse files

MDL-48634 core: changes to automated tests to pass with changes

  • Loading branch information...
markn86 committed Feb 8, 2016
1 parent 5af1321 commit a3dd8be7dc2b31a8b78925803048d8b5d07996a4
@@ -425,6 +425,7 @@ Feature: We can use calculated grade totals
And I set the following settings for grade item "Manual item 2":
| Extra credit | 0 |
| Maximum grade | 200 |
| Rescale existing grades | No |
And I give the grade "21.00" to the user "Student 1" for the grade item "Manual item 2"
And I press "Save changes"
And I give the grade "20.00" to the user "Student 1" for the grade item "Manual item 2"
@@ -435,6 +436,7 @@ Feature: We can use calculated grade totals
And I set the following settings for grade item "Manual item 2":
| Extra credit | 0 |
| Maximum grade | 100 |
| Rescale existing grades | No |
And I give the grade "21.00" to the user "Student 1" for the grade item "Manual item 2"
And I press "Save changes"
And I give the grade "20.00" to the user "Student 1" for the grade item "Manual item 2"
@@ -145,6 +145,7 @@ Feature: Calculated grade items can be used in the gradebook
| Course total | - | 112.50 | 0150 | 75.00 % | - |
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I set the following settings for grade item "calc item":
| Rescale existing grades | No |
| Maximum grade | 40 |
And I follow "Grader report"
And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1"
@@ -146,6 +146,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
| Course total | - | 112.50 | 0200 | 56.25 % | - |
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I set the following settings for grade item "calc item":
| Rescale existing grades | No |
| Maximum grade | 40 |
And I follow "Grader report"
And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1"
@@ -100,11 +100,13 @@ Feature: We can choose what min or max grade to use when aggregating grades.
| Course total | - | 60.00 | 0300 | 20.00 % | - |
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I set the following settings for grade item "MI 1":
| Maximum grade | 50.00 |
| Minimum grade | 5.00 |
| Maximum grade | 50.00 |
| Minimum grade | 5.00 |
| Rescale existing grades | No |
And I set the following settings for grade item "MI 3":
| Maximum grade | 50.00 |
| Minimum grade | 5.00 |
| Maximum grade | 50.00 |
| Minimum grade | 5.00 |
| Rescale existing grades | No |
And I follow "User report"
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
@@ -129,6 +131,7 @@ Feature: We can choose what min or max grade to use when aggregating grades.
And I navigate to "Gradebook setup" node in "Grade administration > Setup"
And I set the following settings for grade item "MI 5":
| Maximum grade | 200.00 |
| Rescale existing grades | No |
And I follow "User report"
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
@@ -29,13 +29,13 @@ Feature: We can change the grading type and maximum grade point values
And I expand all fieldsets
And I set the field "grade[modgrade_type]" to "Point"
Then the "Scale" "select" should be disabled
And the "Maximum points" "field" should be enabled
And the "Maximum grade" "field" should be enabled
And I set the field "grade[modgrade_type]" to "Scale"
And the "Maximum points" "field" should be disabled
And the "Maximum grade" "field" should be disabled
Then the "Scale" "select" should be enabled
And I set the field "grade[modgrade_type]" to "None"
Then the "Scale" "select" should be disabled
And the "Maximum points" "field" should be disabled
And the "Maximum grade" "field" should be disabled
And I press "Save and return to course"

@javascript
@@ -61,7 +61,7 @@ Feature: We can change the grading type and maximum grade point values
And I press "Save and display"
And I follow "Edit settings"
Then the field "grade[modgrade_scale]" matches value "Separate and Connected ways of knowing"
And the "Maximum points" "field" should be disabled
And the "Maximum grade" "field" should be disabled
And I press "Save and return to course"

@javascript
@@ -73,7 +73,7 @@ Feature: We can change the grading type and maximum grade point values
And I press "Save and display"
And I follow "Edit settings"
And the "Scale" "select" should be disabled
And the "Maximum points" "field" should be disabled
And the "Maximum grade" "field" should be disabled
And I press "Save and return to course"

@javascript
@@ -84,7 +84,7 @@ Feature: We can change the grading type and maximum grade point values
And I set the field "grade[modgrade_type]" to "Point"
And I set the field "grade[modgrade_point]" to "20000"
And I press "Save and display"
Then I should see "Invalid Grade Value. This must be an integer between 1 and 900"
Then I should see "Invalid grade value. This must be an integer between 1 and 900"
And I press "Cancel"

@javascript
@@ -104,5 +104,5 @@ Feature: We can change the grading type and maximum grade point values
And I follow "Test Assignment 1"
And I follow "Edit settings"
And I press "Save and display"
Then I should see "Invalid Grade Value. This must be an integer between 1 and 100"
Then I should see "Invalid grade value. This must be an integer between 1 and 100"
And I press "Cancel"
@@ -37,7 +37,7 @@ Feature: Control the aggregation of the scales
And I log out

@javascript
Scenario Outline: Scales can be exluded from aggregation
Scenario Outline: Scales can be excluded from aggregation
Given I log in as "teacher1"
And I follow "Course 1"
And I navigate to "Grades" node in "Course administration"
@@ -36,7 +36,7 @@ Feature: Check that the assignment grade can be rescaled when the max grade is c
Scenario: Update the max grade for an assignment without rescaling existing grades
Given I follow "Edit settings"
And I expand all fieldsets
And I set the field "Maximum points" to "80"
And I set the field "Maximum grade" to "80"
And I set the field "Rescale existing grades" to "No"
When I press "Save and display"
And I follow "View/grade all submissions"
@@ -45,7 +45,7 @@ Feature: Check that the assignment grade can be rescaled when the max grade is c
Scenario: Update the max grade for an assignment rescaling existing grades
Given I follow "Edit settings"
And I expand all fieldsets
And I set the field "Maximum points" to "50"
And I set the field "Maximum grade" to "50"
And I set the field "Rescale existing grades" to "Yes"
When I press "Save and display"
And I follow "View/grade all submissions"
@@ -54,13 +54,13 @@ Feature: Check that the assignment grade can be rescaled when the max grade is c
Scenario: A rescale existing grades is not needed when keeping max grade unchanged
Given I follow "Edit settings"
And I expand all fieldsets
And I set the field "Maximum points" to "100"
And I set the field "Maximum grade" to "100"
When I press "Save and display"
Then I should not see "You must choose whether to rescale existing grades or not."

Scenario: A rescale existing grades must be selected when max grade changes
Given I follow "Edit settings"
And I expand all fieldsets
And I set the field "Maximum points" to "50"
And I set the field "Maximum grade" to "50"
When I press "Save and display"
Then I should see "You must choose whether to rescale existing grades or not."

0 comments on commit a3dd8be

Please sign in to comment.
You can’t perform that action at this time.