From 3e2b8b21c679cf758aa19488590f8b76702e5a2b Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Mon, 26 Nov 2018 11:22:58 +0800 Subject: [PATCH] MDL-64161 gradereport_singleview: Behat test for out of bounds grade. --- .../tests/behat/bulk_insert_grades.feature | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/grade/report/singleview/tests/behat/bulk_insert_grades.feature b/grade/report/singleview/tests/behat/bulk_insert_grades.feature index c99aefe1a2a..2f0d4bbb984 100644 --- a/grade/report/singleview/tests/behat/bulk_insert_grades.feature +++ b/grade/report/singleview/tests/behat/bulk_insert_grades.feature @@ -101,3 +101,17 @@ Feature: We can bulk insert grades for students in a course And the field "Override for Test assignment three" matches value "1" And the field "Grade for Test assignment four" matches value "1.00" And the field "Override for Test assignment four" matches value "1" + + Scenario: I can not update grades if the value is out of bounds. + Given I log in as "teacher1" + And I am on "Course 1" course homepage + And I navigate to "View > Grader report" in the course gradebook + And I follow "Single view for Test assignment one" + And I set the field "Perform bulk insert" to "1" + When I set the field "Insert value" to "-1" + And I press "Save" + Then I should see "The grade entered for Test assignment one for james (Student) 1 is less than the minimum allowed" + And I should see "The grade entered for Test assignment one for holly (Student) 2 is less than the minimum allowed" + And I should see "The grade entered for Test assignment one for anna (Student) 3 is less than the minimum allowed" + And I should see "The grade entered for Test assignment one for zac (Student) 4 is less than the minimum allowed" + And I should see "Grades were set for 0 items" -- 2.43.0