Commit 3a8b9b65 authored by John Okely's avatar John Okely Committed by Adrian Greeve
Browse files

MDL-49412 grades: Update grade unit tests with new navigation

Part of MDL-45774.
parent 8f43702a
......@@ -18,6 +18,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
| activity | course | idnumber | name | intro |
| assign | C1 | assign1 | Assignment1 | Assignment 1 intro |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I follow "Grades"
And I turn editing mode on
......@@ -29,7 +30,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
Then I navigate to "General settings" node in "Site administration > Grades"
And I click on "Show minimum grade" "checkbox"
And I press "Save changes"
And I follow "Home"
And I am on site homepage
And I follow "Course 1"
And I follow "Grades"
And I click on "Edit assign Assignment1" "link"
......@@ -41,7 +42,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
When I navigate to "Grader report" node in "Site administration > Grades > Report settings"
And I click on "Show calculations" "checkbox"
And I press "Save changes"
And I follow "Home"
And I am on site homepage
And I follow "Course 1"
And I follow "Grades"
Then "Edit calculation for Course total" "link" should not exist
......@@ -52,7 +53,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
Then I navigate to "Grade category settings" node in "Site administration > Grades"
And I click on "Allow category grades to be manually overridden" "checkbox"
And I press "Save changes"
And I follow "Home"
And I am on site homepage
And I follow "Course 1"
And I follow "Grades"
And "tr .course input[type='text']" "css_element" should not exist
......@@ -78,9 +78,7 @@ Feature: We can use calculated grade totals
And I press "Save changes"
And I log out
And I log in as "student1"
And I follow "Course 1"
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I follow "My grades" in the user menu
And I should see "30.42 (30.42 %)" in the "overview-grade" "table"
@javascript
......@@ -103,9 +101,7 @@ Feature: We can use calculated grade totals
And I press "Save changes"
And I log out
And I log in as "student1"
And I follow "Course 1"
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I follow "My grades" in the user menu
And I should see "26.94 (26.94 %)" in the "overview-grade" "table"
@javascript
......@@ -126,9 +122,7 @@ Feature: We can use calculated grade totals
And I press "Save changes"
And I log out
And I log in as "student1"
And I follow "Course 1"
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I follow "My grades" in the user menu
And I should see "48.57 (48.57 %)" in the "overview-grade" "table"
@javascript
......@@ -149,9 +143,7 @@ Feature: We can use calculated grade totals
And I press "Save changes"
And I log out
And I log in as "student1"
And I follow "Course 1"
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I follow "My grades" in the user menu
And I should see "47.22 (47.22 %)" in the "overview-grade" "table"
@javascript
......@@ -170,9 +162,7 @@ Feature: We can use calculated grade totals
And I press "Save changes"
And I log out
And I log in as "student1"
And I follow "Course 1"
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I follow "My grades" in the user menu
And I should see "25.83 (25.83 %)" in the "overview-grade" "table"
@javascript
......@@ -195,9 +185,7 @@ Feature: We can use calculated grade totals
And I press "Save changes"
And I log out
And I log in as "student1"
And I follow "Course 1"
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I follow "My grades" in the user menu
And I should see "0.00 (0.00 %)" in the "overview-grade" "table"
@javascript
......@@ -218,9 +206,7 @@ Feature: We can use calculated grade totals
And I press "Save changes"
And I log out
And I log in as "student1"
And I follow "Course 1"
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I follow "My grades" in the user menu
And I should see "50.00 (50.00 %)" in the "overview-grade" "table"
@javascript
......@@ -241,9 +227,7 @@ Feature: We can use calculated grade totals
And I press "Save changes"
And I log out
And I log in as "student1"
And I follow "Course 1"
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I follow "My grades" in the user menu
And I should see "50.00 (50.00 %)" in the "overview-grade" "table"
@javascript
......@@ -275,11 +259,10 @@ Feature: We can use calculated grade totals
And I press "Save changes"
And I log out
And I log in as "student1"
And I follow "My grades" in the user menu
Then I should see "114.82 (18.27 %)" in the "overview-grade" "table"
And I follow "Course 1"
And I follow "Grades"
Then "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
And I set the field "Grade report" to "Overview report"
And I should see "114.82 (18.27 %)" in the "overview-grade" "table"
And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
And I log out
And I log in as "teacher1"
And I follow "Course 1"
......@@ -290,11 +273,10 @@ Feature: We can use calculated grade totals
| Extra credit | 1 |
And I log out
And I log in as "student1"
And I follow "My grades" in the user menu
Then I should see "114.00 (18.39 %)" in the "overview-grade" "table"
And I follow "Course 1"
And I follow "Grades"
Then "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
And I set the field "Grade report" to "Overview report"
And I should see "114.00 (18.39 %)" in the "overview-grade" "table"
And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
And I log out
And I log in as "teacher1"
And I follow "Course 1"
......@@ -306,11 +288,10 @@ Feature: We can use calculated grade totals
| Include outcomes in aggregation | 0 |
And I log out
And I log in as "student1"
And I follow "My grades" in the user menu
Then I should see "110.00 (17.74 %)" in the "overview-grade" "table"
And I follow "Course 1"
And I follow "Grades"
Then "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
And I set the field "Grade report" to "Overview report"
And I should see "110.00 (17.74 %)" in the "overview-grade" "table"
And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
@javascript
Scenario: Natural aggregation on outcome items with modified weights
......@@ -344,11 +325,10 @@ Feature: We can use calculated grade totals
And I press "Save changes"
And I log out
And I log in as "student1"
And I follow "My grades" in the user menu
Then I should see "4.00 (100.00 %)" in the "overview-grade" "table"
And I follow "Course 1"
And I follow "Grades"
Then "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
And I set the field "Grade report" to "Overview report"
And I should see "4.00 (100.00 %)" in the "overview-grade" "table"
And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
@javascript
Scenario: Natural aggregation
......@@ -390,11 +370,9 @@ Feature: We can use calculated grade totals
| Test assignment four | 24.00 % | - | 0–150 | 0.00 % |
And I log out
And I log in as "student1"
And I follow "Course 1"
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I follow "My grades" in the user menu
And I should see "113.75 (23.45 %)" in the "overview-grade" "table"
And I set the field "Grade report" to "User report"
And I follow "Course 1"
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Contribution to course total |
| Test assignment six | 70.00 % | 5.00 (50.00 %) | 0–10 | 1.80 % |
......@@ -409,6 +387,7 @@ Feature: We can use calculated grade totals
Scenario: Natural aggregation with drop lowest
When I log out
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I follow "Grades"
And I turn editing mode on
......@@ -580,11 +559,9 @@ Feature: We can use calculated grade totals
| Test assignment four | 33.71 % | - | 0.00 |
And I log out
And I log in as "student1"
And I follow "Course 1"
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I follow "My grades" in the user menu
And I should see "45.00 (13.85 %)" in the "overview-grade" "table"
And I set the field "Grade report" to "User report"
And I follow "Course 1"
And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Contribution to course total |
| Test assignment six | 0.00 % | 5.00 (50.00 %) | 0.00 % |
......
......@@ -19,7 +19,7 @@ Feature: Extra credit contributions are normalised when going out of bounds
And I log in as "admin"
And I set the following administration settings values:
| grade_aggregations_visible | Simple weighted mean of grades,Mean of grades (with extra credits),Natural |
And I am on homepage
And I am on site homepage
And I follow "Course 1"
And I follow "Grades"
And I navigate to "Categories and items" node in "Grade administration > Setup"
......
......@@ -25,7 +25,7 @@ Feature: We can use a minimum grade different than zero
And I log in as "admin"
And I set the following administration settings values:
| grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
And I am on homepage
And I am on site homepage
And I follow "Course 1"
And I follow "Grades"
And I navigate to "Categories and items" node in "Grade administration > Setup"
......
......@@ -19,7 +19,7 @@ Feature: We can change the grading type and maximum grade point values
| Grade point maximum | 900 |
| Grade point default | 800 |
And I press "Save changes"
And I follow "Home"
And I am on site homepage
And I follow "Course 1"
@javascript
......@@ -99,7 +99,7 @@ Feature: We can change the grading type and maximum grade point values
And I set the following fields to these values:
| Grade point maximum | 100 |
And I press "Save changes"
And I follow "Home"
And I am on site homepage
And I follow "Course 1"
And I follow "Test Assignment 1"
And I follow "Edit settings"
......
......@@ -100,8 +100,8 @@ Feature: View gradebook when scales are used
| Course total | 5.00 |
And I log out
And I log in as "student2"
And I follow "My grades" in the user menu
And I follow "Course 1"
And I follow "Grades"
And the following should exist in the "user-grade" table:
| Grade item | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | B | F–A | 75.00 % | 80.00 % |
......@@ -148,8 +148,8 @@ Feature: View gradebook when scales are used
| Course total<aggregation>. | |
And I log out
And I log in as "student2"
And I follow "My grades" in the user menu
And I follow "Course 1"
And I follow "Grades"
And the following should exist in the "user-grade" table:
| Grade item | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | B | F–A | 75.00 % | <contrib2> |
......
......@@ -66,8 +66,8 @@ Feature: We can enter in grades and view reports from the gradebook
And the "Select all or one user" select box should contain "All users (1)"
And I log out
And I log in as "student1"
And I follow "My grades" in the user menu
And I follow "Course 1"
And I follow "Grades"
Then the following should exist in the "user-grade" table:
| Grade item | Grade | Range | Percentage |
| Test assignment name 1 | 80.00 | 0–100 | 80.00 % |
......@@ -76,7 +76,7 @@ Feature: We can enter in grades and view reports from the gradebook
And the following should not exist in the "user-grade" table:
| Grade item | Grade | Range | Percentage |
| Course total | 90.00 | 0–100 | 90.00 % |
And I set the field "Grade report" to "Overview report"
And I follow "My grades" in the user menu
And "Course 1" row "Grade" column of "overview-grade" table should contain "170.00"
And "Course 1" row "Grade" column of "overview-grade" table should not contain "90.00"
......@@ -94,8 +94,8 @@ Feature: We can enter in grades and view reports from the gradebook
And I press "Save changes"
And I log out
And I log in as "student1"
And I follow "My grades" in the user menu
And I follow "Course 1"
And I follow "Grades"
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage |
| Test assignment name 1 | 41.86 % | 80.00 | 0–100 | 80.00 % |
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment