From 35c88aac05f521ee9bff2aebc51f1e2dd53fbbe0 Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Thu, 6 Mar 2025 10:50:48 +0800 Subject: [PATCH] MDL-84723 behat: final improvements and fixes to the test This commit does few things: - Remove unnecessary grade field to assign generator. - Remove unnecessary comment lines. - Update the warning message assertion to use the no-break space unicode character. --- .../tests/behat/guide_max_grade_mismatch.feature | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/grade/grading/form/guide/tests/behat/guide_max_grade_mismatch.feature b/grade/grading/form/guide/tests/behat/guide_max_grade_mismatch.feature index 4c8336bd3f4..ef955e06e15 100644 --- a/grade/grading/form/guide/tests/behat/guide_max_grade_mismatch.feature +++ b/grade/grading/form/guide/tests/behat/guide_max_grade_mismatch.feature @@ -16,12 +16,10 @@ Feature: Marking guide can handle maximum grade mismatches | teacher1 | C1 | editingteacher | Scenario Outline: Marking guide maximum grade handling - # Set the maximum total grade for assignment to 100. Given the following "activities" exist: - | activity | course | name | advancedgradingmethod_submissions | grade[modgrade_point] | - | assign | C1 | Assign 1 | guide | 100 | + | activity | course | name | advancedgradingmethod_submissions | + | assign | C1 | Assign 1 | guide | And I am on the "Course 1" course page logged in as teacher1 - # Create marking guide. And I go to "Assign 1" advanced grading definition page And I set the following fields to these values: | Name | Assign 1 marking guide | @@ -31,11 +29,9 @@ Feature: Marking guide can handle maximum grade mismatches | Grade Criteria 1 | Grade 1 description for students | Grade 1 description for markers | | | Grade Criteria 2 | Grade 2 description for students | Grade 2 description for markers | 30 | When I press "Save marking guide and make it ready" - # Confirm that marking guide is successfully set as ready. Then I should see "Assign 1 marking guide Ready for use" - # The corresponding warning message that grades will be scaled is displayed. - And I should see "WARNING: Your marking guide has a maximum grade of points" - And I should see "but the maximum grade set in your activity is 100 The maximum score set in your marking guide will be scaled to the maximum grade in the module." + # Please note: We need to add the no-break space unicode character to the warning message otherwise it will fail. + And I should see "WARNING: Your marking guide has a maximum grade of points but the maximum grade set in your activity is 100 The maximum score set in your marking guide will be scaled to the maximum grade in the module." And I should see "Intermediate scores will be converted respectively and rounded to the nearest available grade." Examples: