diff --git a/grade/report/user/tests/behat/user_view.feature b/grade/report/user/tests/behat/user_view.feature index ded04bff316..941d37bfc59 100644 --- a/grade/report/user/tests/behat/user_view.feature +++ b/grade/report/user/tests/behat/user_view.feature @@ -50,7 +50,7 @@ Feature: View the user report as the student will see it Scenario: View the report as the teacher themselves When I navigate to "View > User report" in the course gradebook And I click on "Student 1" in the "user" search widget - And I select "Myself" from the "View report as" singleselect + And I set the field "View report as" to "Myself" Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 13.33 % | @@ -66,7 +66,7 @@ Feature: View the user report as the student will see it Scenario: View the report as the student from both the teachers and students perspective When I navigate to "View > User report" in the course gradebook And I click on "Student 1" in the "user" search widget - And I select "User" from the "View report as" singleselect + And I set the field "View report as" to "User" Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | - | 80.00 | 0–100 | 80.00 % | - | @@ -108,7 +108,7 @@ Feature: View the user report as the student will see it And I press "Save changes" And I navigate to "View > User report" in the course gradebook When I click on "Student 1" in the "user" search widget - And I select "User" from the "View report as" singleselect + And I set the field "View report as" to "User" Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 26.67 % | @@ -146,7 +146,7 @@ Feature: View the user report as the student will see it And I press "Save changes" And I navigate to "View > User report" in the course gradebook When I click on "Student 1" in the "user" search widget - And I select "User" from the "View report as" singleselect + And I set the field "View report as" to "User" Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 13.33 % | @@ -192,7 +192,7 @@ Feature: View the user report as the student will see it And I press "Save changes" And I navigate to "View > User report" in the course gradebook When I click on "Student 1" in the "user" search widget - And I select "User" from the "View report as" singleselect + And I set the field "View report as" to "User" Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 13.33 % | diff --git a/grade/report/user/tests/behat/usersearch.feature b/grade/report/user/tests/behat/usersearch.feature index da1d8b852e5..40d654abbe1 100644 --- a/grade/report/user/tests/behat/usersearch.feature +++ b/grade/report/user/tests/behat/usersearch.feature @@ -21,7 +21,7 @@ Feature: Within the User report, a teacher can search for users. Scenario: A teacher can search for and find a user to view Given I navigate to "View > User report" in the course gradebook - When I click on "Click to select a user" "link" + When I click on ".userwidget" "css_element" Then I confirm "Student 1" in "Select a user" search within the gradebook widget exists And I confirm "Student 2" in "Select a user" search within the gradebook widget exists And I confirm "Student 32" in "Select a user" search within the gradebook widget exists diff --git a/grade/tests/behat/grade_aggregation.feature b/grade/tests/behat/grade_aggregation.feature index ca396878bed..c7508f08930 100644 --- a/grade/tests/behat/grade_aggregation.feature +++ b/grade/tests/behat/grade_aggregation.feature @@ -351,7 +351,7 @@ Feature: We can use calculated grade totals And I press "Save changes" And I navigate to "View > User report" in the course gradebook And I click on "Student 1" in the "user" search widget - And I select "Myself" from the "View report as" singleselect + And I set the field "View report as" to "Myself" And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Contribution to course total | | Test assignment five | 28.57 % | 10.00 (50.00 %) | 0–20 | 1.03 % | @@ -543,7 +543,7 @@ Feature: We can use calculated grade totals Then I should see "75.00 (16.85 %)" in the ".course" "css_element" And I navigate to "View > User report" in the course gradebook And I click on "Student 1" in the "user" search widget - And I select "Myself" from the "View report as" singleselect + And I set the field "View report as" to "Myself" And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Contribution to course total | | Test assignment five | 57.14 % | 10.00 (50.00 %) | 2.25 % | diff --git a/grade/tests/behat/grade_calculated_grade_items.feature b/grade/tests/behat/grade_calculated_grade_items.feature index da234625a12..79136ec40de 100644 --- a/grade/tests/behat/grade_calculated_grade_items.feature +++ b/grade/tests/behat/grade_calculated_grade_items.feature @@ -88,7 +88,7 @@ Feature: Calculated grade items can be used in the gradebook | grade item 1 | - | 75.00 | 0–100 | 75.00 % | - | | Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0–40 | 93.75 % | - | | Course total | - | 37.50 | 0–40 | 93.75 % | - | - And I select "Student 2" from the "Select all or one user" singleselect + And I click on "Student 2" in the "user" search widget And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | grade item 1 | - | 65.00 | 0–100 | 65.00 % | - | @@ -105,7 +105,7 @@ Feature: Calculated grade items can be used in the gradebook | grade item 1 | - | 75.00 | 0–100 | 75.00 % | - | | Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0–40 | 93.75 % | - | | Course total | - | 37.50 | 0–40 | 93.75 % | - | - And I select "Student 2" from the "Select all or one user" singleselect + And I click on "Student 2" in the "user" search widget And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | grade item 1 | - | 65.00 | 0–100 | 65.00 % | - | @@ -155,7 +155,7 @@ Feature: Calculated grade items can be used in the gradebook | grade item 1 | 71.43 % | 75.00 | 0–100 | 75.00 % | 53.57 % | | calc item | 28.57 % | 37.50 | 0–40 | 93.75 % | 26.79 % | | Course total | - | 112.50 | 0–140 | 80.36 % | - | - And I select "Student 2" from the "Select all or one user" singleselect + And I click on "Student 2" in the "user" search widget And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | grade item 1 | 71.43 % | 65.00 | 0–100 | 65.00 % | 46.43 % | diff --git a/grade/tests/behat/grade_calculated_grade_items_20150627.feature b/grade/tests/behat/grade_calculated_grade_items_20150627.feature index 5fcd2e103d5..6437d519458 100644 --- a/grade/tests/behat/grade_calculated_grade_items_20150627.feature +++ b/grade/tests/behat/grade_calculated_grade_items_20150627.feature @@ -89,7 +89,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 | grade item 1 | - | 75.00 | 0–100 | 75.00 % | - | | Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0–100 | 37.50 % | - | | Course total | - | 37.50 | 0–100 | 37.50 % | - | - And I select "Student 2" from the "Select all or one user" singleselect + And I click on "Student 2" in the "user" search widget And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | grade item 1 | - | 65.00 | 0–100 | 65.00 % | - | @@ -106,7 +106,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 | grade item 1 | - | 75.00 | 0–100 | 75.00 % | - | | Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0–100 | 37.50 % | - | | Course total | - | 37.50 | 0–100 | 37.50 % | - | - And I select "Student 2" from the "Select all or one user" singleselect + And I click on "Student 2" in the "user" search widget And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | grade item 1 | - | 65.00 | 0–100 | 65.00 % | - | @@ -156,7 +156,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 | grade item 1 | 50.00 % | 75.00 | 0–100 | 75.00 % | 37.50 % | | calc item | 50.00 % | 37.50 | 0–100 | 37.50 % | 18.75 % | | Course total | - | 112.50 | 0–200 | 56.25 % | - | - And I select "Student 2" from the "Select all or one user" singleselect + And I click on "Student 2" in the "user" search widget And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | grade item 1 | 50.00 % | 65.00 | 0–100 | 65.00 % | 32.50 % | diff --git a/grade/tests/behat/grade_grade_minmax_change.feature b/grade/tests/behat/grade_grade_minmax_change.feature index e6b3fd58e50..61ec6baad59 100644 --- a/grade/tests/behat/grade_grade_minmax_change.feature +++ b/grade/tests/behat/grade_grade_minmax_change.feature @@ -52,7 +52,7 @@ Feature: We can change the maximum and minimum number of points for manual items Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Contribution to course total | | Manual item 1 | 100.00 % | 10.00 | 100.00 % | - And I select "Student 2" from the "Select all or one user" singleselect + And I click on "Student 2" in the "user" search widget And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Contribution to course total | | Manual item 1 | 100.00 % | 8.00 | 80.00 % | @@ -68,7 +68,7 @@ Feature: We can change the maximum and minimum number of points for manual items And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Contribution to course total | | Manual item 1 | 100.00 % | 20.00 | 100.00 % | - And I select "Student 2" from the "Select all or one user" singleselect + And I click on "Student 2" in the "user" search widget And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Contribution to course total | | Manual item 1 | 100.00 % | 16.00 | 80.00 % | diff --git a/grade/tests/behat/grade_hidden_items.feature b/grade/tests/behat/grade_hidden_items.feature index 186cbb6c0e2..35aa047654a 100644 --- a/grade/tests/behat/grade_hidden_items.feature +++ b/grade/tests/behat/grade_hidden_items.feature @@ -56,7 +56,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when And I am on "Course 1" course homepage And I navigate to "View > User report" in the course gradebook And I click on "Student 1" in the "user" search widget - And I select "Myself" from the "View report as" singleselect + And I set the field "View report as" to "Myself" Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 100.00 % | 50.00 | 0–100 | 50.00 % | 25.00 % | diff --git a/grade/tests/behat/grade_hidden_items_locked_category.feature b/grade/tests/behat/grade_hidden_items_locked_category.feature index 9a4b061c2bd..264c7378880 100644 --- a/grade/tests/behat/grade_hidden_items_locked_category.feature +++ b/grade/tests/behat/grade_hidden_items_locked_category.feature @@ -48,7 +48,7 @@ Feature: Hidden grade items should be hidden when grade category is locked, but And I am on "Course 1" course homepage And I navigate to "View > User report" in the course gradebook And I click on "Student 1" in the "user" search widget - And I select "Myself" from the "View report as" singleselect + When I set the field "View report as" to "Myself" Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test locked category total | 100.00 % | 50.00 | 0–100 | 50.00 % | - | diff --git a/grade/tests/behat/grade_mingrade.feature b/grade/tests/behat/grade_mingrade.feature index 5f3fd1d8330..5fdd5f4038a 100644 --- a/grade/tests/behat/grade_mingrade.feature +++ b/grade/tests/behat/grade_mingrade.feature @@ -109,7 +109,7 @@ Feature: We can use a minimum grade different than zero | Manual item 4 | 66.67 % | -10.00 | -1.82 % | | Manual item 5 | 50.00 % | 50.00 | 9.09 % | | Manual item 6 | 50.00 % | 75.00 | 13.64 % | - And I set the field "Select all or one user" to "Student 2" + And I click on "Student 2" in the "user" search widget And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Contribution to course total | | Manual item 1 | 18.18 % | 0.00 | 0.00 % | diff --git a/grade/tests/behat/grade_minmax.feature b/grade/tests/behat/grade_minmax.feature index 36a520936d9..6d3be2f3e49 100644 --- a/grade/tests/behat/grade_minmax.feature +++ b/grade/tests/behat/grade_minmax.feature @@ -86,7 +86,7 @@ Feature: We can choose what min or max grade to use when aggregating grades. | MI 5 | 20.00 % | 100.00 | 0–100 | 100.00 % | 20.00 % | | CAT1 total | 40.00 % | 150.00 | 0–200 | 75.00 % | - | | Course total | - | 350.00 | 0–500 | 70.00 % | - | - And I select "Student 2" from the "Select all or one user" singleselect + And I click on "Student 2" in the "user" search widget And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | MI 1 | 33.33 % | 20.00 | 0–100 | 20.00 % | 6.67 % | @@ -116,7 +116,7 @@ Feature: We can choose what min or max grade to use when aggregating grades. | MI 5 | 25.00 % | 100.00 | 0–100 | 100.00 % | 25.00 % | | CAT1 total | 37.50 % | 150.00 | 0–150 | 100.00 % | - | | Course total | - | 350.00 | 0–400 | 87.50 % | - | - And I select "Student 2" from the "Select all or one user" singleselect + And I click on "Student 2" in the "user" search widget And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | MI 1 | 25.00 % | 20.00 | 5–50 | 33.33 % | 10.00 % | @@ -136,7 +136,7 @@ Feature: We can choose what min or max grade to use when aggregating grades. | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | MI 5 | 40.00 % | 150.00 | 0–200 | 75.00 % | 30.00 % | | Course total | - | 400.00 | 0–500 | 80.00 % | - | - And I select "Student 2" from the "Select all or one user" singleselect + And I click on "Student 2" in the "user" search widget And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | MI 5 | 66.67 % | 30.00 | 0–200 | 15.00 % | 10.00 % | @@ -155,7 +155,7 @@ Feature: We can choose what min or max grade to use when aggregating grades. | MI 5 | 33.33 % | 150.00 | 0–200 | 75.00 % | 25.00 % | | CAT1 total | 33.33 % | 150.00 | 0–200 | 75.00 % | - | | Course total | - | 400.00 | 0–600 | 66.67 % | - | - And I select "Student 2" from the "Select all or one user" singleselect + And I click on "Student 2" in the "user" search widget And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | MI 1 | 25.00 % | 20.00 | 0–100 | 20.00 % | 5.00 % | diff --git a/grade/tests/behat/grade_single_item_scales.feature b/grade/tests/behat/grade_single_item_scales.feature index 9cd97bf9c52..e1d0112fc7b 100644 --- a/grade/tests/behat/grade_single_item_scales.feature +++ b/grade/tests/behat/grade_single_item_scales.feature @@ -72,7 +72,7 @@ Feature: View gradebook when single item scales are used | Test assignment one | Ace! | Ace!–Ace! | 100.00 % | | EN Sub category 1 total| 1.00 | 0–1 | - | | Course total | 1.00 | 0–1 | - | - And I select "Student 2" from the "Select all or one user" singleselect + And I click on "Student 2" in the "user" search widget And the following should exist in the "user-grade" table: | Grade item | Grade | Range | Contribution to course total | | Test assignment one | - | Ace!–Ace! | - | diff --git a/mod/lesson/tests/behat/link_to_gradebook.feature b/mod/lesson/tests/behat/link_to_gradebook.feature index 4f1b67c549c..37904f953aa 100644 --- a/mod/lesson/tests/behat/link_to_gradebook.feature +++ b/mod/lesson/tests/behat/link_to_gradebook.feature @@ -49,7 +49,8 @@ Feature: link to gradebook on the end of lesson page Then I should see "Congratulations - end of lesson reached" And I should see "View grades" And I follow "View grades" - And I should see "User report - Student 1" + And I should see "User report" in the "page-header" "region" + And I should see "Student 1" in the "region-main" "region" And I should see "Test lesson" Scenario: No link to gradebook for non graded lesson