Autoría | Ultima modificación | Ver Log |
@gradepenalty @gradepenalty_duedate @penalty_ruleFeature: As an administratorI need to add new penalty ruleI need to edit penalty ruleI need to delete penalty ruleBackground:Given I log in as "admin"And the following "courses" exist:| fullname | shortname | format || Course 1 | C1 | topics |And I navigate to "Grades > Grade penalties > Manage penalty plugins" in site administrationAnd I click on "Enable Late submission penalties" "checkbox"And I reload the page@javascriptScenario: Edit, add, and delete and insert penalty rulesWhen I navigate to "Grades > Grade penalties > Late submission penalties > Penalty rules" in site administration# Add 5 penalty rules.And I click on "Edit" "button"And I click on "Add rule" "button"And I click on "Add rule" "button"And I click on "Add rule" "button"And I click on "Add rule" "button"And I click on "Add rule" "button"And I set the following fields to these values:| overdueby[0][number] | 1 || penalty[0] | 10 || overdueby[1][number] | 1 || penalty[1] | 10 |And I click on "Save changes" "button"Then I should see "The overdue amount must be greater than the amount for the rule above (1 day). The penalty must be greater than the penalty for the rule above (10.0%)."And I set the following fields to these values:| overdueby[1][number] | 2 || penalty[1] | 20 || overdueby[2][number] | 3 || penalty[2] | 101 |And I click on "Save changes" "button"Then I should see "The penalty cannot be greater than 100.0%."And I set the following fields to these values:| overdueby[2][number] | 3 || penalty[2] | 30 || overdueby[3][number] | 4 || penalty[3] | 40 || overdueby[4][number] | 5 || penalty[4] | 50 || Final penalty rule | 100 |And I click on "Save changes" "button"Then I should see "Changes saved"Then I should see "10%" in the "≤ 1 day" "table_row"Then I should see "20%" in the "≤ 2 days" "table_row"Then I should see "30%" in the "≤ 3 days" "table_row"Then I should see "40%" in the "≤ 4 days" "table_row"Then I should see "50%" in the "≤ 5 days" "table_row"Then I should see "100%" in the "> 5 days" "table_row"@javascriptScenario: Override penalty rules at a course contextWhen I navigate to "Grades > Grade penalties > Late submission penalties > Penalty rules" in site administrationAnd I click on "Edit" "button"# Add 5 penalty rules.And I click on "Add rule" "button"And I click on "Add rule" "button"And I click on "Add rule" "button"And I click on "Add rule" "button"And I click on "Add rule" "button"And I set the following fields to these values:| overdueby[0][number] | 1 || penalty[0] | 10 || overdueby[1][number] | 2 || penalty[1] | 20 || overdueby[2][number] | 3 || penalty[2] | 30 || overdueby[3][number] | 4 || penalty[3] | 40 || overdueby[4][number] | 5 || penalty[4] | 50 || Final penalty rule | 100 |And I click on "Save changes" "button"# Override penalty rules at a course context.When I am on "Course 1" course homepageAnd I navigate to "Grade penalties > Penalty rules" in current page administrationThen I should see "10%" in the "≤ 1 day" "table_row"Then I should see "20%" in the "≤ 2 days" "table_row"Then I should see "30%" in the "≤ 3 days" "table_row"Then I should see "40%" in the "≤ 4 days" "table_row"Then I should see "50%" in the "≤ 5 days" "table_row"Then I should see "100%" in the "> 5 days" "table_row"And I click on "Edit" "button"And I set the following fields to these values:| overdueby[0][number] | 7 || penalty[0] | 20 || overdueby[1][number] | 8 || penalty[1] | 30 || overdueby[2][number] | 9 || penalty[2] | 40 || overdueby[3][number] | 10 || penalty[3] | 50 || overdueby[4][number] | 11 || penalty[4] | 60 || Final penalty rule | 100 |And I click on "Save changes" "button"Then I should see "Changes saved"Then I should see "20%" in the "≤ 7 days" "table_row"Then I should see "30%" in the "≤ 8 days" "table_row"Then I should see "40%" in the "≤ 9 days" "table_row"Then I should see "50%" in the "≤ 10 days" "table_row"Then I should see "60%" in the "≤ 11 days" "table_row"Then I should see "100%" in the "> 11 days" "table_row"# Reset.When I click on "Reset" "button"Then I click on "Continue" "button"Then I should see "10%" in the "≤ 1 day" "table_row"Then I should see "20%" in the "≤ 2 days" "table_row"Then I should see "30%" in the "≤ 3 days" "table_row"Then I should see "40%" in the "≤ 4 days" "table_row"Then I should see "50%" in the "≤ 5 days" "table_row"Then I should see "100%" in the "> 5 days" "table_row"