From a95014f5b41f081432bbb8083ce40adf1fa2618e Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Thu, 11 Aug 2016 15:13:31 +0800 Subject: [PATCH] MDL-55520 assign: Behat test for rescaling max grades bug Verify the max grade is not silently changed back to 100 when you visit and save the assignment settings form. --- mod/assign/tests/behat/rescale_grades.feature | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mod/assign/tests/behat/rescale_grades.feature b/mod/assign/tests/behat/rescale_grades.feature index 8b589ac4113..4d861e5d7c5 100644 --- a/mod/assign/tests/behat/rescale_grades.feature +++ b/mod/assign/tests/behat/rescale_grades.feature @@ -45,6 +45,22 @@ Feature: Check that the assignment grade can be rescaled when the max grade is c And I follow "View all submissions" Then "Student 1" row "Grade" column of "generaltable" table should contain "40.00" + Scenario: Update an assignment without touching the max grades + Given I follow "Edit settings" + And I expand all fieldsets + And I set the field "Rescale existing grades" to "No" + And I set the field "Maximum grade" to "80" + And I press "Save and display" + And I follow "Edit settings" + And I press "Save and display" + And I follow "Edit settings" + And I expand all fieldsets + And I set the field "Rescale existing grades" to "Yes" + And I set the field "Maximum grade" to "80" + When I press "Save and display" + And I follow "View all submissions" + Then "Student 1" row "Grade" column of "generaltable" table should contain "40.00" + Scenario: Update the max grade for an assignment rescaling existing grades Given I follow "Edit settings" And I expand all fieldsets