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

Part of MDL-45774.
This commit is contained in:
John Okely 2015-04-07 16:35:29 +08:00 committed by Adrian Greeve
parent 8f43702a69
commit 3a8b9b6583
7 changed files with 38 additions and 60 deletions

View File

@ -18,6 +18,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
| activity | course | idnumber | name | intro | | activity | course | idnumber | name | intro |
| assign | C1 | assign1 | Assignment1 | Assignment 1 intro | | assign | C1 | assign1 | Assignment1 | Assignment 1 intro |
And I log in as "admin" And I log in as "admin"
And I am on site homepage
And I follow "Course 1" And I follow "Course 1"
And I follow "Grades" And I follow "Grades"
And I turn editing mode on 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" Then I navigate to "General settings" node in "Site administration > Grades"
And I click on "Show minimum grade" "checkbox" And I click on "Show minimum grade" "checkbox"
And I press "Save changes" And I press "Save changes"
And I follow "Home" And I am on site homepage
And I follow "Course 1" And I follow "Course 1"
And I follow "Grades" And I follow "Grades"
And I click on "Edit assign Assignment1" "link" 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" When I navigate to "Grader report" node in "Site administration > Grades > Report settings"
And I click on "Show calculations" "checkbox" And I click on "Show calculations" "checkbox"
And I press "Save changes" And I press "Save changes"
And I follow "Home" And I am on site homepage
And I follow "Course 1" And I follow "Course 1"
And I follow "Grades" And I follow "Grades"
Then "Edit calculation for Course total" "link" should not exist 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" 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 click on "Allow category grades to be manually overridden" "checkbox"
And I press "Save changes" And I press "Save changes"
And I follow "Home" And I am on site homepage
And I follow "Course 1" And I follow "Course 1"
And I follow "Grades" And I follow "Grades"
And "tr .course input[type='text']" "css_element" should not exist And "tr .course input[type='text']" "css_element" should not exist

View File

@ -78,9 +78,7 @@ Feature: We can use calculated grade totals
And I press "Save changes" And I press "Save changes"
And I log out And I log out
And I log in as "student1" And I log in as "student1"
And I follow "Course 1" And I follow "My grades" in the user menu
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I should see "30.42 (30.42 %)" in the "overview-grade" "table" And I should see "30.42 (30.42 %)" in the "overview-grade" "table"
@javascript @javascript
@ -103,9 +101,7 @@ Feature: We can use calculated grade totals
And I press "Save changes" And I press "Save changes"
And I log out And I log out
And I log in as "student1" And I log in as "student1"
And I follow "Course 1" And I follow "My grades" in the user menu
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I should see "26.94 (26.94 %)" in the "overview-grade" "table" And I should see "26.94 (26.94 %)" in the "overview-grade" "table"
@javascript @javascript
@ -126,9 +122,7 @@ Feature: We can use calculated grade totals
And I press "Save changes" And I press "Save changes"
And I log out And I log out
And I log in as "student1" And I log in as "student1"
And I follow "Course 1" And I follow "My grades" in the user menu
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I should see "48.57 (48.57 %)" in the "overview-grade" "table" And I should see "48.57 (48.57 %)" in the "overview-grade" "table"
@javascript @javascript
@ -149,9 +143,7 @@ Feature: We can use calculated grade totals
And I press "Save changes" And I press "Save changes"
And I log out And I log out
And I log in as "student1" And I log in as "student1"
And I follow "Course 1" And I follow "My grades" in the user menu
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I should see "47.22 (47.22 %)" in the "overview-grade" "table" And I should see "47.22 (47.22 %)" in the "overview-grade" "table"
@javascript @javascript
@ -170,9 +162,7 @@ Feature: We can use calculated grade totals
And I press "Save changes" And I press "Save changes"
And I log out And I log out
And I log in as "student1" And I log in as "student1"
And I follow "Course 1" And I follow "My grades" in the user menu
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I should see "25.83 (25.83 %)" in the "overview-grade" "table" And I should see "25.83 (25.83 %)" in the "overview-grade" "table"
@javascript @javascript
@ -195,9 +185,7 @@ Feature: We can use calculated grade totals
And I press "Save changes" And I press "Save changes"
And I log out And I log out
And I log in as "student1" And I log in as "student1"
And I follow "Course 1" And I follow "My grades" in the user menu
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I should see "0.00 (0.00 %)" in the "overview-grade" "table" And I should see "0.00 (0.00 %)" in the "overview-grade" "table"
@javascript @javascript
@ -218,9 +206,7 @@ Feature: We can use calculated grade totals
And I press "Save changes" And I press "Save changes"
And I log out And I log out
And I log in as "student1" And I log in as "student1"
And I follow "Course 1" And I follow "My grades" in the user menu
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I should see "50.00 (50.00 %)" in the "overview-grade" "table" And I should see "50.00 (50.00 %)" in the "overview-grade" "table"
@javascript @javascript
@ -241,9 +227,7 @@ Feature: We can use calculated grade totals
And I press "Save changes" And I press "Save changes"
And I log out And I log out
And I log in as "student1" And I log in as "student1"
And I follow "Course 1" And I follow "My grades" in the user menu
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I should see "50.00 (50.00 %)" in the "overview-grade" "table" And I should see "50.00 (50.00 %)" in the "overview-grade" "table"
@javascript @javascript
@ -275,11 +259,10 @@ Feature: We can use calculated grade totals
And I press "Save changes" And I press "Save changes"
And I log out And I log out
And I log in as "student1" 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 "Course 1"
And I follow "Grades" And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
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 I log out And I log out
And I log in as "teacher1" And I log in as "teacher1"
And I follow "Course 1" And I follow "Course 1"
@ -290,11 +273,10 @@ Feature: We can use calculated grade totals
| Extra credit | 1 | | Extra credit | 1 |
And I log out And I log out
And I log in as "student1" 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 "Course 1"
And I follow "Grades" And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
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 I log out And I log out
And I log in as "teacher1" And I log in as "teacher1"
And I follow "Course 1" And I follow "Course 1"
@ -306,11 +288,10 @@ Feature: We can use calculated grade totals
| Include outcomes in aggregation | 0 | | Include outcomes in aggregation | 0 |
And I log out And I log out
And I log in as "student1" 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 "Course 1"
And I follow "Grades" And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
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"
@javascript @javascript
Scenario: Natural aggregation on outcome items with modified weights 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 press "Save changes"
And I log out And I log out
And I log in as "student1" 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 "Course 1"
And I follow "Grades" And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
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"
@javascript @javascript
Scenario: Natural aggregation Scenario: Natural aggregation
@ -390,11 +370,9 @@ Feature: We can use calculated grade totals
| Test assignment four | 24.00 % | - | 0150 | 0.00 % | | Test assignment four | 24.00 % | - | 0150 | 0.00 % |
And I log out And I log out
And I log in as "student1" And I log in as "student1"
And I follow "Course 1" And I follow "My grades" in the user menu
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I should see "113.75 (23.45 %)" in the "overview-grade" "table" 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: And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Contribution to course total | | Grade item | Calculated weight | Grade | Range | Contribution to course total |
| Test assignment six | 70.00 % | 5.00 (50.00 %) | 010 | 1.80 % | | Test assignment six | 70.00 % | 5.00 (50.00 %) | 010 | 1.80 % |
@ -409,6 +387,7 @@ Feature: We can use calculated grade totals
Scenario: Natural aggregation with drop lowest Scenario: Natural aggregation with drop lowest
When I log out When I log out
And I log in as "admin" And I log in as "admin"
And I am on site homepage
And I follow "Course 1" And I follow "Course 1"
And I follow "Grades" And I follow "Grades"
And I turn editing mode on And I turn editing mode on
@ -580,11 +559,9 @@ Feature: We can use calculated grade totals
| Test assignment four | 33.71 % | - | 0.00 | | Test assignment four | 33.71 % | - | 0.00 |
And I log out And I log out
And I log in as "student1" And I log in as "student1"
And I follow "Course 1" And I follow "My grades" in the user menu
And I follow "Grades"
And I set the field "Grade report" to "Overview report"
And I should see "45.00 (13.85 %)" in the "overview-grade" "table" 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: And the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Contribution to course total | | Grade item | Calculated weight | Grade | Contribution to course total |
| Test assignment six | 0.00 % | 5.00 (50.00 %) | 0.00 % | | Test assignment six | 0.00 % | 5.00 (50.00 %) | 0.00 % |

View File

@ -19,7 +19,7 @@ Feature: Extra credit contributions are normalised when going out of bounds
And I log in as "admin" And I log in as "admin"
And I set the following administration settings values: And I set the following administration settings values:
| grade_aggregations_visible | Simple weighted mean of grades,Mean of grades (with extra credits),Natural | | 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 "Course 1"
And I follow "Grades" And I follow "Grades"
And I navigate to "Categories and items" node in "Grade administration > Setup" And I navigate to "Categories and items" node in "Grade administration > Setup"

View File

@ -25,7 +25,7 @@ Feature: We can use a minimum grade different than zero
And I log in as "admin" And I log in as "admin"
And I set the following administration settings values: 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 | | 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 "Course 1"
And I follow "Grades" And I follow "Grades"
And I navigate to "Categories and items" node in "Grade administration > Setup" And I navigate to "Categories and items" node in "Grade administration > Setup"

View File

@ -19,7 +19,7 @@ Feature: We can change the grading type and maximum grade point values
| Grade point maximum | 900 | | Grade point maximum | 900 |
| Grade point default | 800 | | Grade point default | 800 |
And I press "Save changes" And I press "Save changes"
And I follow "Home" And I am on site homepage
And I follow "Course 1" And I follow "Course 1"
@javascript @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: And I set the following fields to these values:
| Grade point maximum | 100 | | Grade point maximum | 100 |
And I press "Save changes" And I press "Save changes"
And I follow "Home" And I am on site homepage
And I follow "Course 1" And I follow "Course 1"
And I follow "Test Assignment 1" And I follow "Test Assignment 1"
And I follow "Edit settings" And I follow "Edit settings"

View File

@ -100,8 +100,8 @@ Feature: View gradebook when scales are used
| Course total | 5.00 | | Course total | 5.00 |
And I log out And I log out
And I log in as "student2" And I log in as "student2"
And I follow "My grades" in the user menu
And I follow "Course 1" And I follow "Course 1"
And I follow "Grades"
And the following should exist in the "user-grade" table: And the following should exist in the "user-grade" table:
| Grade item | Grade | Range | Percentage | Contribution to course total | | Grade item | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | B | FA | 75.00 % | 80.00 % | | Test assignment one | B | FA | 75.00 % | 80.00 % |
@ -148,8 +148,8 @@ Feature: View gradebook when scales are used
| Course total<aggregation>. | | | Course total<aggregation>. | |
And I log out And I log out
And I log in as "student2" And I log in as "student2"
And I follow "My grades" in the user menu
And I follow "Course 1" And I follow "Course 1"
And I follow "Grades"
And the following should exist in the "user-grade" table: And the following should exist in the "user-grade" table:
| Grade item | Grade | Range | Percentage | Contribution to course total | | Grade item | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | B | FA | 75.00 % | <contrib2> | | Test assignment one | B | FA | 75.00 % | <contrib2> |

View File

@ -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 the "Select all or one user" select box should contain "All users (1)"
And I log out And I log out
And I log in as "student1" And I log in as "student1"
And I follow "My grades" in the user menu
And I follow "Course 1" And I follow "Course 1"
And I follow "Grades"
Then the following should exist in the "user-grade" table: Then the following should exist in the "user-grade" table:
| Grade item | Grade | Range | Percentage | | Grade item | Grade | Range | Percentage |
| Test assignment name 1 | 80.00 | 0100 | 80.00 % | | Test assignment name 1 | 80.00 | 0100 | 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: And the following should not exist in the "user-grade" table:
| Grade item | Grade | Range | Percentage | | Grade item | Grade | Range | Percentage |
| Course total | 90.00 | 0100 | 90.00 % | | Course total | 90.00 | 0100 | 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 contain "170.00"
And "Course 1" row "Grade" column of "overview-grade" table should not contain "90.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 press "Save changes"
And I log out And I log out
And I log in as "student1" And I log in as "student1"
And I follow "My grades" in the user menu
And I follow "Course 1" And I follow "Course 1"
And I follow "Grades"
Then the following should exist in the "user-grade" table: Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | | Grade item | Calculated weight | Grade | Range | Percentage |
| Test assignment name 1 | 41.86 % | 80.00 | 0100 | 80.00 % | | Test assignment name 1 | 41.86 % | 80.00 | 0100 | 80.00 % |