From f2013ebac7cff76ec085564a89bc346954c25dc5 Mon Sep 17 00:00:00 2001 From: Mihail Geshoski Date: Mon, 24 Jun 2024 15:20:17 +0800 Subject: [PATCH] MDL-80744 core_grades: Deprecate comboboxsearch behat step definitions The comboboxsearch component now has uses beyond the grade subcomponent and includes alternative step definitions in behat_general.php. This change deprecates the redundant behat step definitions related to this component in behat_grade.php and replaces current usages with the alternative definitions. --- .upgradenotes/MDL-80744-2024062407163290.yml | 20 +++ .../activity_completion_criteria.feature | 2 +- .../grader/tests/behat/groupsearch.feature | 32 ++--- .../tests/behat/tertiary_name_filter.feature | 2 +- .../tertiary_navigation_searching.feature | 68 ++++----- .../tests/behat/gradeitemsearch.feature | 10 +- .../tests/behat/reportswitching.feature | 2 +- .../singleview/tests/behat/singleview.feature | 26 ++-- .../singleview/tests/behat/usersearch.feature | 64 ++++----- .../user/tests/behat/groupsearch.feature | 32 ++--- .../behat/toggle_grade_categories.feature | 2 +- .../behat/user_report_navigation.feature | 4 +- .../report/user/tests/behat/user_view.feature | 10 +- .../user/tests/behat/usersearch.feature | 62 ++++----- .../user/tests/behat/view_usereport.feature | 12 +- grade/tests/behat/behat_grade.php | 95 ------------- grade/tests/behat/behat_grade_deprecated.php | 129 ++++++++++++++++++ grade/tests/behat/grade_aggregation.feature | 4 +- .../grade_calculated_grade_items.feature | 18 +-- ...de_calculated_grade_items_20150627.feature | 18 +-- .../behat/grade_calculated_weights.feature | 20 +-- ...ade_contribution_with_extra_credit.feature | 2 +- .../behat/grade_grade_minmax_change.feature | 8 +- grade/tests/behat/grade_hidden_items.feature | 2 +- ...grade_hidden_items_locked_category.feature | 2 +- grade/tests/behat/grade_mingrade.feature | 4 +- grade/tests/behat/grade_minmax.feature | 16 +-- .../behat/grade_natural_exclude_empty.feature | 20 +-- ...ade_natural_exclude_empty_20150619.feature | 20 +-- grade/tests/behat/grade_scales.feature | 4 +- .../behat/grade_scales_aggregation.feature | 4 +- .../behat/grade_single_item_scales.feature | 6 +- .../tests/behat/group_submission.feature | 4 +- .../tests/behat/grading_attempts.feature | 20 +-- .../tests/behat/sending_attempt.feature | 2 +- 35 files changed, 400 insertions(+), 346 deletions(-) create mode 100644 .upgradenotes/MDL-80744-2024062407163290.yml diff --git a/.upgradenotes/MDL-80744-2024062407163290.yml b/.upgradenotes/MDL-80744-2024062407163290.yml new file mode 100644 index 0000000000000..c92a3760e8009 --- /dev/null +++ b/.upgradenotes/MDL-80744-2024062407163290.yml @@ -0,0 +1,20 @@ +issueNumber: MDL-80744 +notes: + core_grades: + - message: >- + The behat step definition + behat_grade::i_confirm_in_search_within_the_gradebook_widget_exists has + been deprecated. Please use + behat_general::i_confirm_in_search_combobox_exists instead. + type: deprecated + - message: >- + The behat step definition + behat_grade::i_confirm_in_search_within_the_gradebook_widget_does_not_exist + has been deprecated. Please use + behat_general::i_confirm_in_search_combobox_does_not_exist instead. + type: deprecated + - message: >- + The behat step definition behat_grade::i_click_on_in_search_widget has + been deprecated. Please use behat_general::i_click_on_in_search_combobox + instead. + type: deprecated diff --git a/completion/tests/behat/activity_completion_criteria.feature b/completion/tests/behat/activity_completion_criteria.feature index 1679166a4d593..24d085ff6e577 100644 --- a/completion/tests/behat/activity_completion_criteria.feature +++ b/completion/tests/behat/activity_completion_criteria.feature @@ -112,7 +112,7 @@ Feature: Allow to mark course as completed without cron for activity completion Given I am on the "Completion course" "grades > Single View > View" page logged in as "teacher1" And I click on "Users" "link" in the ".page-toggler" "css_element" And I turn editing mode on - And I click on "Student First" in the "user" search widget + And I click on "Student First" in the "Search users" search combo box And I set the field "Override for Test assignment name" to "1" When I set the following fields to these values: | Grade for Test assignment name | 10.00 | diff --git a/grade/report/grader/tests/behat/groupsearch.feature b/grade/report/grader/tests/behat/groupsearch.feature index 668f9b958cd30..2f46c09182801 100644 --- a/grade/report/grader/tests/behat/groupsearch.feature +++ b/grade/report/grader/tests/behat/groupsearch.feature @@ -36,13 +36,13 @@ Feature: Group searching functionality within the grader report. Then ".groupsearchwidget" "css_element" should not exist Scenario: A teacher can search for and find a group to display - Given I confirm "Tutor group" in "group" search within the gradebook widget exists - And I confirm "Marker group" in "group" search within the gradebook widget exists + Given I confirm "Tutor group" exists in the "Search groups" search combo box + And I confirm "Marker group" exists in the "Search groups" search combo box When I set the field "Search groups" to "tutor" And I wait until "Marker group" "option_role" does not exist - Then I confirm "Tutor group" in "group" search within the gradebook widget exists - And I confirm "Marker group" in "group" search within the gradebook widget does not exist - And I click on "Tutor group" in the "group" search widget + Then I confirm "Tutor group" exists in the "Search groups" search combo box + And I confirm "Marker group" does not exist in the "Search groups" search combo box + And I click on "Tutor group" in the "Search groups" search combo box # The search input remains in the field on reload this is in keeping with other search implementations. And I click on ".groupsearchwidget" "css_element" And the field "Search groups" matches value "tutor" @@ -52,22 +52,22 @@ Feature: Group searching functionality within the grader report. Scenario: A teacher can only see the group members in the 'user' search widget after selecting a group option # Confirm that all users are initially displayed in the 'user' search widget. Given I set the field "Search users" to "Student" - And I confirm "Student 1" in "user" search within the gradebook widget exists - And I confirm "Student 2" in "user" search within the gradebook widget exists + And I confirm "Student 1" exists in the "Search users" search combo box + And I confirm "Student 2" exists in the "Search users" search combo box # Select a particular group from the 'group' search widget. - When I click on "Default group" in the "group" search widget + When I click on "Default group" in the "Search groups" search combo box # Confirm that only users which are members of the selected group are displayed in the 'user' search widget. And I set the field "Search users" to "Student" - Then I confirm "Student 1" in "user" search within the gradebook widget exists - And I confirm "Student 2" in "user" search within the gradebook widget does not exist - And I click on "Tutor group" in the "group" search widget + Then I confirm "Student 1" exists in the "Search users" search combo box + And I confirm "Student 2" does not exist in the "Search users" search combo box + And I click on "Tutor group" in the "Search groups" search combo box And I set the field "Search users" to "Student" - And I confirm "Student 1" in "user" search within the gradebook widget does not exist - And I confirm "Student 2" in "user" search within the gradebook widget does not exist - And I click on "All participants" in the "group" search widget + And I confirm "Student 1" does not exist in the "Search users" search combo box + And I confirm "Student 2" does not exist in the "Search users" search combo box + And I click on "All participants" in the "Search groups" search combo box And I set the field "Search users" to "Student" - And I confirm "Student 1" in "user" search within the gradebook widget exists - And I confirm "Student 2" in "user" search within the gradebook widget exists + And I confirm "Student 1" exists in the "Search users" search combo box + And I confirm "Student 2" exists in the "Search users" search combo box @accessibility Scenario: A teacher can set focus and search using the input with a keyboard diff --git a/grade/report/grader/tests/behat/tertiary_name_filter.feature b/grade/report/grader/tests/behat/tertiary_name_filter.feature index ae82f47d565b6..b079f65dcb0a3 100644 --- a/grade/report/grader/tests/behat/tertiary_name_filter.feature +++ b/grade/report/grader/tests/behat/tertiary_name_filter.feature @@ -150,7 +150,7 @@ Feature: Within the grader report, test that we can open our generic filter drop Scenario: A teacher can search and then filter by first or last name Given I set the field "Search users" to "Student 1" - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box And I click on "Filter by name" "combobox" And I select "S" in the "First name" "core_grades > initials bar" When I press "Apply" diff --git a/grade/report/grader/tests/behat/tertiary_navigation_searching.feature b/grade/report/grader/tests/behat/tertiary_navigation_searching.feature index b9319b3f7dea9..5f4390379d400 100644 --- a/grade/report/grader/tests/behat/tertiary_navigation_searching.feature +++ b/grade/report/grader/tests/behat/tertiary_navigation_searching.feature @@ -54,8 +54,8 @@ Feature: Within the grader report, test that we can search for users | Teacher 1 | When I set the field "Search users" to "Turtle" And I wait until "View all results (1)" "option_role" exists - And I confirm "Turtle Manatee" in "user" search within the gradebook widget exists - And I confirm "User Example" in "user" search within the gradebook widget does not exist + And I confirm "Turtle Manatee" exists in the "Search users" search combo box + And I confirm "User Example" does not exist in the "Search users" search combo box And I click on "Turtle Manatee" "list_item" # Business case: This will trigger a page reload and can not dynamically update the table. And I wait until the page is ready @@ -76,7 +76,7 @@ Feature: Within the grader report, test that we can search for users Scenario: A teacher can search the grader report to find specified users # Case: Standard search. - Given I click on "Dummy" in the "user" search widget + Given I click on "Dummy" in the "Search users" search combo box And the following should exist in the "user-grades" table: | -1- | | Dummy User | @@ -106,14 +106,14 @@ Feature: Within the grader report, test that we can search for users # Case: Multiple users found and select only one result. Then I set the field "Search users" to "User" And I wait until "View all results (3)" "option_role" exists - And I confirm "Dummy User" in "user" search within the gradebook widget exists - And I confirm "User Example" in "user" search within the gradebook widget exists - And I confirm "User Test" in "user" search within the gradebook widget exists - And I confirm "Turtle Manatee" in "user" search within the gradebook widget does not exist + And I confirm "Dummy User" exists in the "Search users" search combo box + And I confirm "User Example" exists in the "Search users" search combo box + And I confirm "User Test" exists in the "Search users" search combo box + And I confirm "Turtle Manatee" does not exist in the "Search users" search combo box # Check if the matched field names (by lines) includes some identifiable info to help differentiate similar users. - And I confirm "User (student2@example.com)" in "user" search within the gradebook widget exists - And I confirm "User (student3@example.com)" in "user" search within the gradebook widget exists - And I confirm "User (student4@example.com)" in "user" search within the gradebook widget exists + And I confirm "User (student2@example.com)" exists in the "Search users" search combo box + And I confirm "User (student3@example.com)" exists in the "Search users" search combo box + And I confirm "User (student4@example.com)" exists in the "Search users" search combo box And I click on "Dummy User" "list_item" And I wait until the page is ready And the following should exist in the "user-grades" table: @@ -156,7 +156,7 @@ Feature: Within the grader report, test that we can search for users | Dummy User | Scenario: A teacher can quickly tell that a search is active on the current table - When I click on "Turtle" in the "user" search widget + When I click on "Turtle" in the "Search users" search combo box # The search input should contain the name of the user we have selected, so that it is clear that the result pertains to a specific user. Then the field "Search users" matches value "Turtle Manatee" # Test if we can then further retain the turtle result set and further filter from there. @@ -171,54 +171,54 @@ Feature: Within the grader report, test that we can search for users And I set the field "Search users" to "@example.com" And I wait until "View all results (5)" "option_role" exists # Note: All learners match this email & showing emails is current default. - And I confirm "Dummy User" in "user" search within the gradebook widget exists - And I confirm "User Example" in "user" search within the gradebook widget exists - And I confirm "User Test" in "user" search within the gradebook widget exists - And I confirm "Student 1" in "user" search within the gradebook widget exists - And I confirm "Turtle Manatee" in "user" search within the gradebook widget exists + And I confirm "Dummy User" exists in the "Search users" search combo box + And I confirm "User Example" exists in the "Search users" search combo box + And I confirm "User Test" exists in the "Search users" search combo box + And I confirm "Student 1" exists in the "Search users" search combo box + And I confirm "Turtle Manatee" exists in the "Search users" search combo box # Search on the country field. When I set the field "Search users" to "JP" And I wait until "Turtle Manatee" "list_item" does not exist - And I confirm "Dummy User" in "user" search within the gradebook widget exists - And I confirm "User Test" in "user" search within the gradebook widget exists + And I confirm "Dummy User" exists in the "Search users" search combo box + And I confirm "User Test" exists in the "Search users" search combo box # Search on the city field. And I set the field "Search users" to "Hanoi" And I wait until "User Test" "list_item" does not exist - Then I confirm "Student 1" in "user" search within the gradebook widget exists + Then I confirm "Student 1" exists in the "Search users" search combo box # Search on the institution field. And I set the field "Search users" to "ABCD" And I wait until "Dummy User" "list_item" exists - And I confirm "User Example" in "user" search within the gradebook widget exists - And I confirm "User Test" in "user" search within the gradebook widget exists - And I confirm "Student 1" in "user" search within the gradebook widget exists - And I confirm "Turtle Manatee" in "user" search within the gradebook widget exists + And I confirm "User Example" exists in the "Search users" search combo box + And I confirm "User Test" exists in the "Search users" search combo box + And I confirm "Student 1" exists in the "Search users" search combo box + And I confirm "Turtle Manatee" exists in the "Search users" search combo box # Search on the department field. And I set the field "Search users" to "ABC3" And I wait until "User Example" "list_item" does not exist - And I confirm "User Test" in "user" search within the gradebook widget exists - And I confirm "Turtle Manatee" in "user" search within the gradebook widget exists + And I confirm "User Test" exists in the "Search users" search combo box + And I confirm "Turtle Manatee" exists in the "Search users" search combo box # Search on the phone1 field. And I set the field "Search users" to "4365899871" And I wait until "User Test" "list_item" does not exist - And I confirm "Dummy User" in "user" search within the gradebook widget exists + And I confirm "Dummy User" exists in the "Search users" search combo box # Search on the phone2 field. And I set the field "Search users" to "2149871323" And I wait until "Dummy User" "list_item" does not exist - And I confirm "User Test" in "user" search within the gradebook widget exists + And I confirm "User Test" exists in the "Search users" search combo box # Search on the institution field then press enter to show the record set. And I set the field "Search users" to "ABC" And I wait until "Turtle Manatee" "list_item" exists - And I confirm "Dummy User" in "user" search within the gradebook widget exists - And I confirm "User Example" in "user" search within the gradebook widget exists - And I confirm "User Test" in "user" search within the gradebook widget exists - And I confirm "Student 1" in "user" search within the gradebook widget exists + And I confirm "Dummy User" exists in the "Search users" search combo box + And I confirm "User Example" exists in the "Search users" search combo box + And I confirm "User Test" exists in the "Search users" search combo box + And I confirm "Student 1" exists in the "Search users" search combo box And I press the down key And I press the enter key And I wait "1" seconds @@ -305,7 +305,7 @@ Feature: Within the grader report, test that we can search for users # Begin the search checking if we are adhering the filters. When I set the field "Search users" to "Turtle" - Then I confirm "Turtle Manatee" in "user" search within the gradebook widget does not exist + Then I confirm "Turtle Manatee" does not exist in the "Search users" search combo box Scenario: A teacher can reset the search and filters all at once Given I set the field "Search users" to "Turtle" @@ -320,7 +320,7 @@ Feature: Within the grader report, test that we can search for users And the following should exist in the "user-grades" table: | -1- | | Turtle Manatee | - And I click on "Default group" in the "group" search widget + And I click on "Default group" in the "Search groups" search combo box And the following should exist in the "user-grades" table: | -1- | | Turtle Manatee | @@ -344,7 +344,7 @@ Feature: Within the grader report, test that we can search for users When I set the field "Search users" to "42" # One of the users' phone numbers also matches. And I wait until "View all results (2)" "option_role" exists - Then I confirm "Student s42" in "user" search within the gradebook widget exists + Then I confirm "Student s42" exists in the "Search users" search combo box Scenario: As a teacher I save grades using search and pagination Given "42" "users" exist with the following data: diff --git a/grade/report/singleview/tests/behat/gradeitemsearch.feature b/grade/report/singleview/tests/behat/gradeitemsearch.feature index e78f350fbce2f..cbac97a4bb77c 100644 --- a/grade/report/singleview/tests/behat/gradeitemsearch.feature +++ b/grade/report/singleview/tests/behat/gradeitemsearch.feature @@ -22,13 +22,13 @@ Feature: Given we have opted to search for a grade item, Lets find and search th Scenario: A teacher can search for and find a grade item to view Given I click on "Grade items" "link" in the ".page-toggler" "css_element" And I click on ".gradesearchwidget" "css_element" - When I confirm "Test assignment one" in "grade" search within the gradebook widget exists - And I confirm "Test assignment two" in "grade" search within the gradebook widget exists + When I confirm "Test assignment one" exists in the "Search items" search combo box + And I confirm "Test assignment two" exists in the "Search items" search combo box Then I set the field "Search items" to "two" And I wait until "Test assignment one" "option_role" does not exist - And I confirm "Test assignment one" in "grade" search within the gradebook widget does not exist - And I confirm "Test assignment two" in "grade" search within the gradebook widget exists - And I click on "Test assignment two" in the "grade" search widget + And I confirm "Test assignment one" does not exist in the "Search items" search combo box + And I confirm "Test assignment two" exists in the "Search items" search combo box + And I click on "Test assignment two" in the "Search items" search combo box # The search input remains in the field on reload this is in keeping with other search implementations. And I click on ".gradesearchwidget" "css_element" And the field "Search items" matches value "two" diff --git a/grade/report/singleview/tests/behat/reportswitching.feature b/grade/report/singleview/tests/behat/reportswitching.feature index 176b946150b7e..885ad3afca1b2 100644 --- a/grade/report/singleview/tests/behat/reportswitching.feature +++ b/grade/report/singleview/tests/behat/reportswitching.feature @@ -20,7 +20,7 @@ Feature: Given we land on the index page, select what type of report we wish to Given I am on the "Course 1" "grades > Single view > View" page logged in as "teacher1" And I click on "Grade items" "link" in the ".page-toggler" "css_element" And "Search users" "field" should not exist - And I confirm "Test assignment one" in "grade" search within the gradebook widget exists + And I confirm "Test assignment one" exists in the "Search items" search combo box When I click on "Users" "link" in the ".page-toggler" "css_element" Then "Search users" "field" should exist And "Select a grade item" "combobox" should not exist diff --git a/grade/report/singleview/tests/behat/singleview.feature b/grade/report/singleview/tests/behat/singleview.feature index 1cb9f29b24c01..7c6222289883d 100644 --- a/grade/report/singleview/tests/behat/singleview.feature +++ b/grade/report/singleview/tests/behat/singleview.feature @@ -60,7 +60,7 @@ Feature: We can use Single view Scenario: I can update grades, add feedback and exclude grades. Given I navigate to "View > Single view" in the course gradebook And I click on "Users" "link" in the ".page-toggler" "css_element" - And I click on "Student" in the "user" search widget + And I click on "Student" in the "Search users" search combo box And I turn editing mode on And I set the field "Override for Test assignment one" to "1" When I set the following fields to these values: @@ -88,7 +88,7 @@ Feature: We can use Single view Then I should see "Grades were set for 2 items" And the field "Grade for Ann, Jill, Grainne, Beauchamp" matches value "12.05" And the field "Exclude for Jane, Nina, Niamh, Cholmondely" matches value "1" - And I click on "new grade item 1" in the "grade" search widget + And I click on "new grade item 1" in the "Search items" search combo box And I set the field "Grade for Ann, Jill, Grainne, Beauchamp" to "Very good" And I press "Save" Then I should see "Grades were set for 1 items" @@ -97,7 +97,7 @@ Feature: We can use Single view | Ann, Jill, Grainne, Beauchamp | Very good | And I am on the "Course 1" "grades > Single view > View" page logged in as "teacher2" And I click on "Users" "link" in the ".page-toggler" "css_element" - And I click on "Student" in the "user" search widget + And I click on "Student" in the "Search users" search combo box And I turn editing mode on And the "Exclude for Test assignment one" "checkbox" should be disabled And the "Override for Test assignment one" "checkbox" should be enabled @@ -157,9 +157,9 @@ Feature: We can use Single view And I open the action menu in "Test assignment four" "table_row" And I choose "Show all grades" in the open action menu Then I should see "Test assignment four" - And I click on "Test assignment three" in the "grade" search widget + And I click on "Test assignment three" in the "Search items" search combo box Then I should see "Test assignment three" - And I click on "Test assignment four" in the "grade" search widget + And I click on "Test assignment four" in the "Search items" search combo box Then I should see "Test assignment four" Scenario: Activities are clickable only when it has a valid activity page. @@ -181,7 +181,7 @@ Feature: We can use Single view Scenario: Teacher sees his last viewed user report when navigating back to the gradebook singleview report. Given I navigate to "View > Single view" in the course gradebook - And I click on "Gronya,Beecham" in the "user" search widget + And I click on "Gronya,Beecham" in the "Search users" search combo box And I should see "Gronya,Beecham" in the "region-main" "region" When I am on the "Course 1" "grades > Single view > View" page Then I should not see "Search for a user to view all their grades" in the "region-main" "region" @@ -192,7 +192,7 @@ Feature: We can use Single view Scenario: Teacher sees his last viewed grade item report when navigating back to the gradebook singleview report. Given I navigate to "View > Single view" in the course gradebook And I click on "Grade items" "link" - And I click on "Test assignment one" in the "grade" search widget + And I click on "Test assignment one" in the "Search items" search combo box And I should see "Test assignment one" in the "region-main" "region" When I am on the "Course 1" "grades > Single view > View" page Then I should not see "Select a grade item above" in the "region-main" "region" @@ -212,9 +212,9 @@ Feature: We can use Single view And I set the field "Group mode" to "Visible groups" And I press "Save and display" And I navigate to "View > Single view" in the course gradebook - And I click on "Nee,Chumlee" in the "user" search widget + And I click on "Nee,Chumlee" in the "Search users" search combo box And I navigate to "View > Grader report" in the course gradebook - And I click on "Group 1" in the "group" search widget + And I click on "Group 1" in the "Search groups" search combo box When I navigate to "View > Single view" in the course gradebook Then I should see "Nee,Chumlee" in the "region-main" "region" And I should not see "Search for a user to view all their grades" in the "region-main" "region" @@ -231,16 +231,16 @@ Feature: We can use Single view And I set the field "Group mode" to "Visible groups" And I press "Save and display" And I navigate to "View > Single view" in the course gradebook - And I click on "Gronya,Beecham" in the "user" search widget + And I click on "Gronya,Beecham" in the "Search users" search combo box And I navigate to "View > Grader report" in the course gradebook - And I click on "Group 1" in the "group" search widget + And I click on "Group 1" in the "Search groups" search combo box When I navigate to "View > Single view" in the course gradebook Then I should see "Search for a user to view all their grades" in the "region-main" "region" And I should not see "Gronya,Beecham" in the "region-main" "region" Scenario: Teacher does not see his last viewed user report if that user is no longer enrolled in the course. Given I navigate to "View > Single view" in the course gradebook - And I click on "Gronya,Beecham" in the "user" search widget + And I click on "Gronya,Beecham" in the "Search users" search combo box And I navigate to course participants And I click on "Unenrol" "icon" in the "Gronya,Beecham" "table_row" And I click on "Unenrol" "button" in the "Unenrol" "dialogue" @@ -251,7 +251,7 @@ Feature: We can use Single view Scenario: Teacher does not see his last viewed grade item report if the item no longer exists in the course. Given I navigate to "View > Single view" in the course gradebook And I click on "Grade items" "link" - And I click on "Test assignment four" in the "grade" search widget + And I click on "Test assignment four" in the "Search items" search combo box And I am on "Course 1" course homepage with editing mode on And I delete "Test assignment four" activity And I run all adhoc tasks diff --git a/grade/report/singleview/tests/behat/usersearch.feature b/grade/report/singleview/tests/behat/usersearch.feature index 0540d5ce53593..d47cfb08812f1 100644 --- a/grade/report/singleview/tests/behat/usersearch.feature +++ b/grade/report/singleview/tests/behat/usersearch.feature @@ -37,8 +37,8 @@ Feature: Within the singleview report, a teacher can search for users. Given I should see "Search users" And I should see "Search for a user to view all their grades" When I set the field "Search users" to "Turtle" - And I confirm "Turtle Manatee" in "user" search within the gradebook widget exists - And I confirm "User Example" in "user" search within the gradebook widget does not exist + And I confirm "Turtle Manatee" exists in the "Search users" search combo box + And I confirm "User Example" does not exist in the "Search users" search combo box And I click on "Turtle Manatee" "list_item" # Business case: This will trigger a page reload and can not dynamically update the table. And I wait until the page is ready @@ -55,7 +55,7 @@ Feature: Within the singleview report, a teacher can search for users. Scenario: A teacher can search the single view report to find specified users # Case: Standard search. - Given I click on "Dummy" in the "user" search widget + Given I click on "Dummy" in the "Search users" search combo box And "Dummy User" "heading" should exist And "Teacher 1" "heading" should not exist And "Student 1" "heading" should not exist @@ -77,14 +77,14 @@ Feature: Within the singleview report, a teacher can search for users. # Case: Multiple users found and select only one result. Then I set the field "Search users" to "User" And I wait until "Dummy User" "option_role" exists - And I confirm "Dummy User" in "user" search within the gradebook widget exists - And I confirm "User Example" in "user" search within the gradebook widget exists - And I confirm "User Test" in "user" search within the gradebook widget exists - And I confirm "Turtle Manatee" in "user" search within the gradebook widget does not exist + And I confirm "Dummy User" exists in the "Search users" search combo box + And I confirm "User Example" exists in the "Search users" search combo box + And I confirm "User Test" exists in the "Search users" search combo box + And I confirm "Turtle Manatee" does not exist in the "Search users" search combo box # Check if the matched field names (by lines) includes some identifiable info to help differentiate similar users. - And I confirm "User (student2@example.com)" in "user" search within the gradebook widget exists - And I confirm "User (student3@example.com)" in "user" search within the gradebook widget exists - And I confirm "User (student4@example.com)" in "user" search within the gradebook widget exists + And I confirm "User (student2@example.com)" exists in the "Search users" search combo box + And I confirm "User (student3@example.com)" exists in the "Search users" search combo box + And I confirm "User (student4@example.com)" exists in the "Search users" search combo box And I click on "Dummy User" "list_item" And I wait until the page is ready And "Dummy User" "heading" should exist @@ -101,7 +101,7 @@ Feature: Within the singleview report, a teacher can search for users. And I wait until "No results for \"a\"" "text" exists Scenario: A teacher can quickly tell that a search is active on the current table - Given I click on "Turtle" in the "user" search widget + Given I click on "Turtle" in the "Search users" search combo box And I wait until the page is ready # The search input remains in the field on reload this is in keeping with other search implementations. When the field "Search users" matches value "Turtle Manatee" @@ -118,55 +118,55 @@ Feature: Within the singleview report, a teacher can search for users. And I set the field "Search users" to "@example.com" And I wait until "Dummy User" "list_item" exists # Note: All learners match this email & showing emails is current default. - And I confirm "Dummy User" in "user" search within the gradebook widget exists - And I confirm "User Example" in "user" search within the gradebook widget exists - And I confirm "User Test" in "user" search within the gradebook widget exists - And I confirm "Student 1" in "user" search within the gradebook widget exists - And I confirm "Turtle Manatee" in "user" search within the gradebook widget exists + And I confirm "Dummy User" exists in the "Search users" search combo box + And I confirm "User Example" exists in the "Search users" search combo box + And I confirm "User Test" exists in the "Search users" search combo box + And I confirm "Student 1" exists in the "Search users" search combo box + And I confirm "Turtle Manatee" exists in the "Search users" search combo box # Search on the country field. When I set the field "Search users" to "JP" And I wait until "Dummy User" "list_item" exists And I wait until "Turtle Manatee" "list_item" does not exist - And I confirm "Dummy User" in "user" search within the gradebook widget exists - And I confirm "User Test" in "user" search within the gradebook widget exists + And I confirm "Dummy User" exists in the "Search users" search combo box + And I confirm "User Test" exists in the "Search users" search combo box # Search on the city field. And I set the field "Search users" to "Hanoi" And I wait until "User Test" "list_item" does not exist - Then I confirm "Student 1" in "user" search within the gradebook widget exists + Then I confirm "Student 1" exists in the "Search users" search combo box # Search on the institution field. And I set the field "Search users" to "ABCD" And I wait until "Dummy User" "list_item" exists - And I confirm "User Example" in "user" search within the gradebook widget exists - And I confirm "User Test" in "user" search within the gradebook widget exists - And I confirm "Student 1" in "user" search within the gradebook widget exists - And I confirm "Turtle Manatee" in "user" search within the gradebook widget exists + And I confirm "User Example" exists in the "Search users" search combo box + And I confirm "User Test" exists in the "Search users" search combo box + And I confirm "Student 1" exists in the "Search users" search combo box + And I confirm "Turtle Manatee" exists in the "Search users" search combo box # Search on the department field. And I set the field "Search users" to "ABC3" And I wait until "User Example" "list_item" does not exist - And I confirm "User Test" in "user" search within the gradebook widget exists - And I confirm "Turtle Manatee" in "user" search within the gradebook widget exists + And I confirm "User Test" exists in the "Search users" search combo box + And I confirm "Turtle Manatee" exists in the "Search users" search combo box # Search on the phone1 field. And I set the field "Search users" to "4365899871" And I wait until "User Test" "list_item" does not exist - And I confirm "Dummy User" in "user" search within the gradebook widget exists + And I confirm "Dummy User" exists in the "Search users" search combo box # Search on the phone2 field. And I set the field "Search users" to "2149871323" And I wait until "Dummy User" "list_item" does not exist - And I confirm "User Test" in "user" search within the gradebook widget exists + And I confirm "User Test" exists in the "Search users" search combo box # Search on the institution field then press enter to show the record set. And I set the field "Search users" to "ABC" And "Turtle Manatee" "list_item" should exist - And I confirm "Dummy User" in "user" search within the gradebook widget exists - And I confirm "User Example" in "user" search within the gradebook widget exists - And I confirm "User Test" in "user" search within the gradebook widget exists - And I confirm "Student 1" in "user" search within the gradebook widget exists + And I confirm "Dummy User" exists in the "Search users" search combo box + And I confirm "User Example" exists in the "Search users" search combo box + And I confirm "User Test" exists in the "Search users" search combo box + And I confirm "Student 1" exists in the "Search users" search combo box And I press the down key And I press the enter key And I wait until the page is ready @@ -219,4 +219,4 @@ Feature: Within the singleview report, a teacher can search for users. And I press the tab key And the focused element is "Clear search input" "button" in the ".user-search" "css_element" And I press the enter key - And I confirm "Turtle Manatee" in "user" search within the gradebook widget does not exist + And I confirm "Turtle Manatee" does not exist in the "Search users" search combo box diff --git a/grade/report/user/tests/behat/groupsearch.feature b/grade/report/user/tests/behat/groupsearch.feature index a32e27c2d9c14..42e65ebcf1cf6 100644 --- a/grade/report/user/tests/behat/groupsearch.feature +++ b/grade/report/user/tests/behat/groupsearch.feature @@ -38,13 +38,13 @@ Feature: Group searching functionality within the user report. Then ".groupsearchwidget" "css_element" should not exist Scenario: A teacher can search for and find a group to find a user in - Given I confirm "Tutor group" in "group" search within the gradebook widget exists - And I confirm "Marker group" in "group" search within the gradebook widget exists + Given I confirm "Tutor group" exists in the "Search groups" search combo box + And I confirm "Marker group" exists in the "Search groups" search combo box When I set the field "Search groups" to "tutor" And I wait "1" seconds - Then I confirm "Tutor group" in "group" search within the gradebook widget exists - And I confirm "Marker group" in "group" search within the gradebook widget does not exist - And I click on "Tutor group" in the "group" search widget + Then I confirm "Tutor group" exists in the "Search groups" search combo box + And I confirm "Marker group" does not exist in the "Search groups" search combo box + And I click on "Tutor group" in the "Search groups" search combo box # The search input remains in the field on reload this is in keeping with other search implementations. And I click on ".groupsearchwidget" "css_element" And the field "Search groups" matches value "tutor" @@ -54,22 +54,22 @@ Feature: Group searching functionality within the user report. Scenario: A teacher can only see the group members in the 'user' search widget after selecting a group option # Confirm that all users are initially displayed in the 'user' search widget. Given I set the field "Search users" to "Student" - And I confirm "Student 1" in "user" search within the gradebook widget exists - And I confirm "Student 2" in "user" search within the gradebook widget exists + And I confirm "Student 1" exists in the "Search users" search combo box + And I confirm "Student 2" exists in the "Search users" search combo box # Select a particular group from the 'group' search widget. - When I click on "Default group" in the "group" search widget + When I click on "Default group" in the "Search groups" search combo box # Confirm that only users which are members of the selected group are displayed in the 'user' search widget. And I set the field "Search users" to "Student" - Then I confirm "Student 1" in "user" search within the gradebook widget exists - And I confirm "Student 2" in "user" search within the gradebook widget does not exist - And I click on "Tutor group" in the "group" search widget + Then I confirm "Student 1" exists in the "Search users" search combo box + And I confirm "Student 2" does not exist in the "Search users" search combo box + And I click on "Tutor group" in the "Search groups" search combo box And I set the field "Search users" to "Student" - And I confirm "Student 1" in "user" search within the gradebook widget does not exist - And I confirm "Student 2" in "user" search within the gradebook widget does not exist - And I click on "All participants" in the "group" search widget + And I confirm "Student 1" does not exist in the "Search users" search combo box + And I confirm "Student 2" does not exist in the "Search users" search combo box + And I click on "All participants" in the "Search groups" search combo box And I set the field "Search users" to "Student" - And I confirm "Student 1" in "user" search within the gradebook widget exists - And I confirm "Student 2" in "user" search within the gradebook widget exists + And I confirm "Student 1" exists in the "Search users" search combo box + And I confirm "Student 2" exists in the "Search users" search combo box @accessibility Scenario: A teacher can set focus and search using the input with a keyboard diff --git a/grade/report/user/tests/behat/toggle_grade_categories.feature b/grade/report/user/tests/behat/toggle_grade_categories.feature index ddcd995c9e625..55429c840c613 100644 --- a/grade/report/user/tests/behat/toggle_grade_categories.feature +++ b/grade/report/user/tests/behat/toggle_grade_categories.feature @@ -28,7 +28,7 @@ Feature: User can toggle the visibility of the grade categories within the user Scenario: A teacher can search for and find a user to view Given I am on the "Course" "grades > User report > View" page logged in as "teacher1" - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box And I should see "Test assignment one" in the "user-grade" "table" And I should see "Test assignment two" in the "user-grade" "table" And I should see "Category 1 total" in the "user-grade" "table" diff --git a/grade/report/user/tests/behat/user_report_navigation.feature b/grade/report/user/tests/behat/user_report_navigation.feature index 00dd1212eb938..706049ae07702 100644 --- a/grade/report/user/tests/behat/user_report_navigation.feature +++ b/grade/report/user/tests/behat/user_report_navigation.feature @@ -26,7 +26,7 @@ Feature: Teacher can navigate to the previous or next user report. And I am on the "Course" "grades > User report > View" page logged in as "teacher1" Scenario: A teacher can navigate to the next user report - Given I click on "Student 1" in the "user" search widget + Given I click on "Student 1" in the "Search users" search combo box And "Student 1" "heading" should exist And ".previous" "css_element" should not exist in the ".user-navigation" "css_element" And ".next" "css_element" should exist in the ".user-navigation" "css_element" @@ -44,7 +44,7 @@ Feature: Teacher can navigate to the previous or next user report. And ".next" "css_element" should not exist in the ".user-navigation" "css_element" Scenario: A teacher can navigate to the previous user report - Given I click on "Student 3" in the "user" search widget + Given I click on "Student 3" in the "Search users" search combo box And "Student 3" "heading" should exist And ".previous" "css_element" should exist in the ".user-navigation" "css_element" And I should see "Student 2" in the ".previous" "css_element" diff --git a/grade/report/user/tests/behat/user_view.feature b/grade/report/user/tests/behat/user_view.feature index 388b21910ca14..38f4ea2cc5d77 100644 --- a/grade/report/user/tests/behat/user_view.feature +++ b/grade/report/user/tests/behat/user_view.feature @@ -52,7 +52,7 @@ Feature: View the user report as the student will see it | activity | course | idnumber | name | intro | grade | | quiz | C1 | q1 | Test quiz one | Submit something! | 100 | When I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box And I should see "Course 1 & '\"" And I should not see "Course 1 & '\"" And I set the field "View report as" to "Myself" @@ -77,7 +77,7 @@ Feature: View the user report as the student will see it | activity | course | idnumber | name | intro | grade | | quiz | C1 | q1 | Test quiz one | Submit something! | 100 | When I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box 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 | @@ -126,7 +126,7 @@ Feature: View the user report as the student will see it And I set the field with xpath "//select[@name='report_user_showtotalsifcontainhidden']" to "Show totals excluding hidden items" 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 + When I click on "Student 1" in the "Search users" search combo box 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 | @@ -163,7 +163,7 @@ Feature: View the user report as the student will see it And I set the field with xpath "//select[@name='report_user_showtotalsifcontainhidden']" to "Show totals including hidden items" 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 + When I click on "Student 1" in the "Search users" search combo box 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 | @@ -204,7 +204,7 @@ Feature: View the user report as the student will see it And I set the field with xpath "//select[@name='report_user_showtotalsifcontainhidden']" to "Show totals excluding hidden items" 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 + When I click on "Student 1" in the "Search users" search combo box 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 | diff --git a/grade/report/user/tests/behat/usersearch.feature b/grade/report/user/tests/behat/usersearch.feature index 6f969081be2d7..370acd7a3d2d2 100644 --- a/grade/report/user/tests/behat/usersearch.feature +++ b/grade/report/user/tests/behat/usersearch.feature @@ -38,8 +38,8 @@ Feature: Within the User report, a teacher can search for users. And I should see "Search for a user to view their report" When I set the field "Search users" to "Turtle" And "View all results (5)" "option_role" should exist - And I confirm "Turtle Manatee" in "user" search within the gradebook widget exists - And I confirm "User Example" in "user" search within the gradebook widget does not exist + And I confirm "Turtle Manatee" exists in the "Search users" search combo box + And I confirm "User Example" does not exist in the "Search users" search combo box And I click on "Turtle Manatee" "list_item" # Business case: This will trigger a page reload and can not dynamically update the table. And I wait until the page is ready @@ -56,7 +56,7 @@ Feature: Within the User report, a teacher can search for users. Scenario: A teacher can search the user report to find specified users # Case: Standard search. - Given I click on "Dummy" in the "user" search widget + Given I click on "Dummy" in the "Search users" search combo box And "Dummy User" "heading" should exist And "Teacher 1" "heading" should not exist And "Student 1" "heading" should not exist @@ -77,14 +77,14 @@ Feature: Within the User report, a teacher can search for users. # Case: Multiple users found and select only one result. Then I set the field "Search users" to "User" And "View all results (5)" "option_role" should exist - And I confirm "Dummy User" in "user" search within the gradebook widget exists - And I confirm "User Example" in "user" search within the gradebook widget exists - And I confirm "User Test" in "user" search within the gradebook widget exists - And I confirm "Turtle Manatee" in "user" search within the gradebook widget does not exist + And I confirm "Dummy User" exists in the "Search users" search combo box + And I confirm "User Example" exists in the "Search users" search combo box + And I confirm "User Test" exists in the "Search users" search combo box + And I confirm "Turtle Manatee" does not exist in the "Search users" search combo box # Check if the matched field names (by lines) includes some identifiable info to help differentiate similar users. - And I confirm "User (student2@example.com)" in "user" search within the gradebook widget exists - And I confirm "User (student3@example.com)" in "user" search within the gradebook widget exists - And I confirm "User (student4@example.com)" in "user" search within the gradebook widget exists + And I confirm "User (student2@example.com)" exists in the "Search users" search combo box + And I confirm "User (student3@example.com)" exists in the "Search users" search combo box + And I confirm "User (student4@example.com)" exists in the "Search users" search combo box And I click on "Dummy User" "list_item" And I wait until the page is ready And "Dummy User" "heading" should exist @@ -121,7 +121,7 @@ Feature: Within the User report, a teacher can search for users. And I should see "No results for \"a\"" Scenario: A teacher can quickly tell that a search is active on the current table - When I click on "Turtle" in the "user" search widget + When I click on "Turtle" in the "Search users" search combo box # The search input should contain the name of the user we have selected, so that it is clear that the result pertains to a specific user. Then the field "Search users" matches value "Turtle Manatee" And I wait until "View all results (5)" "link" does not exist @@ -137,55 +137,55 @@ Feature: Within the User report, a teacher can search for users. And I set the field "Search users" to "@example.com" And "View all results (5)" "option_role" should exist # Note: All learners match this email & showing emails is current default. - And I confirm "Dummy User" in "user" search within the gradebook widget exists - And I confirm "User Example" in "user" search within the gradebook widget exists - And I confirm "User Test" in "user" search within the gradebook widget exists - And I confirm "Student 1" in "user" search within the gradebook widget exists - And I confirm "Turtle Manatee" in "user" search within the gradebook widget exists + And I confirm "Dummy User" exists in the "Search users" search combo box + And I confirm "User Example" exists in the "Search users" search combo box + And I confirm "User Test" exists in the "Search users" search combo box + And I confirm "Student 1" exists in the "Search users" search combo box + And I confirm "Turtle Manatee" exists in the "Search users" search combo box # Search on the country field. When I set the field "Search users" to "JP" And "View all results (5)" "option_role" should exist And I wait until "Turtle Manatee" "list_item" does not exist - And I confirm "Dummy User" in "user" search within the gradebook widget exists - And I confirm "User Test" in "user" search within the gradebook widget exists + And I confirm "Dummy User" exists in the "Search users" search combo box + And I confirm "User Test" exists in the "Search users" search combo box # Search on the city field. And I set the field "Search users" to "Hanoi" And I wait until "User Test" "list_item" does not exist - Then I confirm "Student 1" in "user" search within the gradebook widget exists + Then I confirm "Student 1" exists in the "Search users" search combo box # Search on the institution field. And I set the field "Search users" to "ABCD" And "Dummy User" "list_item" should exist - And I confirm "User Example" in "user" search within the gradebook widget exists - And I confirm "User Test" in "user" search within the gradebook widget exists - And I confirm "Student 1" in "user" search within the gradebook widget exists - And I confirm "Turtle Manatee" in "user" search within the gradebook widget exists + And I confirm "User Example" exists in the "Search users" search combo box + And I confirm "User Test" exists in the "Search users" search combo box + And I confirm "Student 1" exists in the "Search users" search combo box + And I confirm "Turtle Manatee" exists in the "Search users" search combo box # Search on the department field. And I set the field "Search users" to "ABC3" And I wait until "User Example" "list_item" does not exist - And I confirm "User Test" in "user" search within the gradebook widget exists - And I confirm "Turtle Manatee" in "user" search within the gradebook widget exists + And I confirm "User Test" exists in the "Search users" search combo box + And I confirm "Turtle Manatee" exists in the "Search users" search combo box # Search on the phone1 field. And I set the field "Search users" to "4365899871" And I wait until "User Test" "list_item" does not exist - And I confirm "Dummy User" in "user" search within the gradebook widget exists + And I confirm "Dummy User" exists in the "Search users" search combo box # Search on the phone2 field. And I set the field "Search users" to "2149871323" And I wait until "Dummy User" "list_item" does not exist - And I confirm "User Test" in "user" search within the gradebook widget exists + And I confirm "User Test" exists in the "Search users" search combo box # Search on the institution field then press enter to show the record set. And I set the field "Search users" to "ABC" And "Turtle Manatee" "list_item" should exist - And I confirm "Dummy User" in "user" search within the gradebook widget exists - And I confirm "User Example" in "user" search within the gradebook widget exists - And I confirm "User Test" in "user" search within the gradebook widget exists - And I confirm "Student 1" in "user" search within the gradebook widget exists + And I confirm "Dummy User" exists in the "Search users" search combo box + And I confirm "User Example" exists in the "Search users" search combo box + And I confirm "User Test" exists in the "Search users" search combo box + And I confirm "Student 1" exists in the "Search users" search combo box And I press the up key And I press the enter key And I wait until the page is ready diff --git a/grade/report/user/tests/behat/view_usereport.feature b/grade/report/user/tests/behat/view_usereport.feature index 03d8169f3c1d1..d4dbad98c7b41 100644 --- a/grade/report/user/tests/behat/view_usereport.feature +++ b/grade/report/user/tests/behat/view_usereport.feature @@ -25,7 +25,7 @@ Feature: We can use the user report | student1 | C1 | student | And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1" And I should see "Search for a user to view their report" in the "region-main" "region" - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box And I should see "Student 1" in the "region-main" "region" When I am on the "Course 1" "grades > User report > View" page Then I should not see "Search for a user to view their report" in the "region-main" "region" @@ -51,9 +51,9 @@ Feature: We can use the user report | user | group | | student2 | G1 | And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1" - And I click on "Student 2" in the "user" search widget + And I click on "Student 2" in the "Search users" search combo box And I navigate to "View > Grader report" in the course gradebook - And I click on "Group 1" in the "group" search widget + And I click on "Group 1" in the "Search groups" search combo box When I navigate to "View > User report" in the course gradebook Then I should see "Student 2" in the "region-main" "region" And I should not see "Search for a user to view their report" in the "region-main" "region" @@ -76,9 +76,9 @@ Feature: We can use the user report | user | group | | student2 | G1 | And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1" - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box And I navigate to "View > Grader report" in the course gradebook - And I click on "Group 1" in the "group" search widget + And I click on "Group 1" in the "Search groups" search combo box When I navigate to "View > User report" in the course gradebook Then I should see "Search for a user to view their report" in the "region-main" "region" And I should not see "Student 1" in the "region-main" "region" @@ -95,7 +95,7 @@ Feature: We can use the user report | student1 | C1 | student | | student2 | C1 | student | And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1" - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box And I should see "Student 1" in the "region-main" "region" And I navigate to course participants And I click on "Unenrol" "icon" in the "Student 1" "table_row" diff --git a/grade/tests/behat/behat_grade.php b/grade/tests/behat/behat_grade.php index 1a136f11a9097..631a49e23643e 100644 --- a/grade/tests/behat/behat_grade.php +++ b/grade/tests/behat/behat_grade.php @@ -304,99 +304,4 @@ public function i_navigate_to_export_page_in_the_course_gradebook($gradeexportop protected function select_in_gradebook_navigation_selector() { \core\deprecation::emit_deprecation_if_present([self::class, __FUNCTION__]); } - - /** - * We tend to use this series of steps a bit so define em once. - * - * @param string $haystack What are we searching within? - * @param string $needle What are we looking for? - * @param bool $fieldset Do we want to set the search field at the same time? - * @return string - * @throws coding_exception - */ - private function get_dropdown_selector(string $haystack, string $needle, bool $fieldset = true): string { - $this->execute("behat_general::wait_until_the_page_is_ready"); - - // Set the default field to search and handle any special preamble. - $string = get_string('searchusers', 'core'); - $selector = '.usersearchdropdown'; - if (strtolower($haystack) === 'group') { - $string = get_string('searchgroups', 'core'); - $selector = '.groupsearchdropdown'; - $trigger = ".groupsearchwidget"; - $node = $this->find("css_element", $selector); - if (!$node->isVisible()) { - $this->execute("behat_general::i_click_on", [$trigger, "css_element"]); - } - } else if (strtolower($haystack) === 'grade') { - $string = get_string('searchitems', 'core'); - $selector = '.gradesearchdropdown'; - $trigger = ".gradesearchwidget"; - $node = $this->find("css_element", $selector); - if (!$node->isVisible()) { - $this->execute("behat_general::i_click_on", [$trigger, "css_element"]); - } - } - - if ($fieldset) { - $this->execute("behat_forms::set_field_value", [$string, $needle]); - $this->execute("behat_general::wait_until_exists", [$needle, "list_item"]); - } - return $selector; - } - - /** - * Confirm if a value is within the search widget within the gradebook. - * - * Examples: - * - I confirm "User" in "user" search within the gradebook widget exists - * - I confirm "Group" in "group" search within the gradebook widget exists - * - I confirm "Grade item" in "grade" search within the gradebook widget exists - * - * @Given /^I confirm "(?P(?:[^"]|\\")*)" in "(?P(?:[^"]|\\")*)" search within the gradebook widget exists$/ - * @param string $needle The value to search for. - * @param string $haystack The type of the search widget. - */ - public function i_confirm_in_search_within_the_gradebook_widget_exists($needle, $haystack) { - $this->execute("behat_general::assert_element_contains_text", - [$needle, $this->get_dropdown_selector($haystack, $needle, false), "css_element"]); - } - - /** - * Confirm if a value is not within the search widget within the gradebook. - * - * Examples: - * - I confirm "User" in "user" search within the gradebook widget does not exist - * - I confirm "Group" in "group" search within the gradebook widget does not exist - * - I confirm "Grade item" in "grade" search within the gradebook widget does not exist - * - * @Given /^I confirm "(?P(?:[^"]|\\")*)" in "(?P(?:[^"]|\\")*)" search within the gradebook widget does not exist$/ - * @param string $needle The value to search for. - * @param string $haystack The type of the search widget. - */ - public function i_confirm_in_search_within_the_gradebook_widget_does_not_exist($needle, $haystack) { - $this->execute("behat_general::assert_element_not_contains_text", - [$needle, $this->get_dropdown_selector($haystack, $needle, false), "css_element"]); - } - - /** - * Clicks on an option from the specified search widget in the current gradebook page. - * - * Examples: - * - I click on "Student" in the "user" search widget - * - I click on "Group" in the "group" search widget - * - I click on "Grade item" in the "grade" search widget - * - * @Given /^I click on "(?P(?:[^"]|\\")*)" in the "(?P(?:[^"]|\\")*)" search widget$/ - * @param string $needle The value to search for. - * @param string $haystack The type of the search widget. - */ - public function i_click_on_in_search_widget(string $needle, string $haystack) { - $selector = $this->get_dropdown_selector($haystack, $needle); - $this->execute('behat_general::i_click_on_in_the', [ - $needle, "list_item", - $selector, "css_element" - ]); - $this->execute("behat_general::i_wait_to_be_redirected"); - } } diff --git a/grade/tests/behat/behat_grade_deprecated.php b/grade/tests/behat/behat_grade_deprecated.php index e77641251f5e3..23f45a63bda1d 100644 --- a/grade/tests/behat/behat_grade_deprecated.php +++ b/grade/tests/behat/behat_grade_deprecated.php @@ -53,4 +53,133 @@ public function i_give_the_feedback($feedback, $userfullname, $itemname) { $this->execute('behat_forms::i_set_the_field_to', array($this->escape($fieldstr), $this->escape($feedback))); } + + /** + * Confirm if a value is within the search widget within the gradebook. + * + * Examples: + * - I confirm "User" in "user" search within the gradebook widget exists + * - I confirm "Group" in "group" search within the gradebook widget exists + * - I confirm "Grade item" in "grade" search within the gradebook widget exists + * + * @Given /^I confirm "(?P(?:[^"]|\\")*)" in "(?P(?:[^"]|\\")*)" search within the gradebook widget exists$/ + * @param string $needle The value to search for. + * @param string $haystack The type of the search widget. + * @deprecated since 4.5 + */ + public function i_confirm_in_search_within_the_gradebook_widget_exists($needle, $haystack) { + $this->deprecated_message('behat_general::i_confirm_in_search_combobox_exists'); + + $this->execute("behat_general::wait_until_the_page_is_ready"); + + // Set the default field to search and handle any special preamble. + $selector = '.usersearchdropdown'; + if (strtolower($haystack) === 'group') { + $selector = '.groupsearchdropdown'; + $trigger = ".groupsearchwidget"; + $node = $this->find("css_element", $selector); + if (!$node->isVisible()) { + $this->execute("behat_general::i_click_on", [$trigger, "css_element"]); + } + } else if (strtolower($haystack) === 'grade') { + $selector = '.gradesearchdropdown'; + $trigger = ".gradesearchwidget"; + $node = $this->find("css_element", $selector); + if (!$node->isVisible()) { + $this->execute("behat_general::i_click_on", [$trigger, "css_element"]); + } + } + + $this->execute("behat_general::assert_element_contains_text", + [$needle, $selector, "css_element"]); + } + + /** + * Confirm if a value is not within the search widget within the gradebook. + * + * Examples: + * - I confirm "User" in "user" search within the gradebook widget does not exist + * - I confirm "Group" in "group" search within the gradebook widget does not exist + * - I confirm "Grade item" in "grade" search within the gradebook widget does not exist + * + * @Given /^I confirm "(?P(?:[^"]|\\")*)" in "(?P(?:[^"]|\\")*)" search within the gradebook widget does not exist$/ + * @param string $needle The value to search for. + * @param string $haystack The type of the search widget. + * @deprecated since 4.5 + */ + public function i_confirm_in_search_within_the_gradebook_widget_does_not_exist($needle, $haystack) { + $this->deprecated_message('behat_general::i_confirm_in_search_combobox_does_not_exist'); + + $this->execute("behat_general::wait_until_the_page_is_ready"); + + // Set the default field to search and handle any special preamble. + $selector = '.usersearchdropdown'; + if (strtolower($haystack) === 'group') { + $selector = '.groupsearchdropdown'; + $trigger = ".groupsearchwidget"; + $node = $this->find("css_element", $selector); + if (!$node->isVisible()) { + $this->execute("behat_general::i_click_on", [$trigger, "css_element"]); + } + } else if (strtolower($haystack) === 'grade') { + $selector = '.gradesearchdropdown'; + $trigger = ".gradesearchwidget"; + $node = $this->find("css_element", $selector); + if (!$node->isVisible()) { + $this->execute("behat_general::i_click_on", [$trigger, "css_element"]); + } + } + + $this->execute("behat_general::assert_element_not_contains_text", + [$needle, $selector, "css_element"]); + } + + /** + * Clicks on an option from the specified search widget in the current gradebook page. + * + * Examples: + * - I click on "Student" in the "user" search widget + * - I click on "Group" in the "group" search widget + * - I click on "Grade item" in the "grade" search widget + * + * @Given /^I click on "(?P(?:[^"]|\\")*)" in the "(?P(?:[^"]|\\")*)" search widget$/ + * @param string $needle The value to search for. + * @param string $haystack The type of the search widget. + * @deprecated since 4.5 + */ + public function i_click_on_in_search_widget(string $needle, string $haystack) { + $this->deprecated_message('behat_general::i_click_on_in_search_combobox'); + + $this->execute("behat_general::wait_until_the_page_is_ready"); + + // Set the default field to search and handle any special preamble. + $string = get_string('searchusers', 'core'); + $selector = '.usersearchdropdown'; + if (strtolower($haystack) === 'group') { + $string = get_string('searchgroups', 'core'); + $selector = '.groupsearchdropdown'; + $trigger = ".groupsearchwidget"; + $node = $this->find("css_element", $selector); + if (!$node->isVisible()) { + $this->execute("behat_general::i_click_on", [$trigger, "css_element"]); + } + } else if (strtolower($haystack) === 'grade') { + $string = get_string('searchitems', 'core'); + $selector = '.gradesearchdropdown'; + $trigger = ".gradesearchwidget"; + $node = $this->find("css_element", $selector); + if (!$node->isVisible()) { + $this->execute("behat_general::i_click_on", [$trigger, "css_element"]); + } + } + + $this->execute("behat_forms::set_field_value", [$string, $needle]); + $this->execute("behat_general::wait_until_exists", [$needle, "list_item"]); + + $this->execute('behat_general::i_click_on_in_the', [ + $needle, "list_item", + $selector, "css_element" + ]); + $this->execute("behat_general::i_wait_to_be_redirected"); + } } diff --git a/grade/tests/behat/grade_aggregation.feature b/grade/tests/behat/grade_aggregation.feature index ea728cfa72577..7329d47d40126 100644 --- a/grade/tests/behat/grade_aggregation.feature +++ b/grade/tests/behat/grade_aggregation.feature @@ -345,7 +345,7 @@ Feature: We can use calculated grade totals And I set the field "Show weightings" to "Show" 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 click on "Student 1" in the "Search users" search combo box 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 | @@ -542,7 +542,7 @@ Feature: We can use calculated grade totals And I navigate to "View > Grader report" in the course gradebook 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 click on "Student 1" in the "Search users" search combo box 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 | diff --git a/grade/tests/behat/grade_calculated_grade_items.feature b/grade/tests/behat/grade_calculated_grade_items.feature index e3f7cb50658d6..81e6e3a99cd18 100644 --- a/grade/tests/behat/grade_calculated_grade_items.feature +++ b/grade/tests/behat/grade_calculated_grade_items.feature @@ -41,7 +41,7 @@ Feature: Calculated grade items can be used in the gradebook And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" 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 click on "Student 1" in the "Search users" search combo box And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | grade item 1 | - | 75.00 | 0–100 | 75.00 % | - | @@ -71,7 +71,7 @@ Feature: Calculated grade items can be used in the gradebook And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" 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 click on "Student 1" in the "Search users" search combo box And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | grade item 1 | - | 75.00 | 0–100 | 75.00 % | - | @@ -84,13 +84,13 @@ Feature: Calculated grade items can be used in the gradebook And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1" 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 + When I click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | grade item 1 | - | 75.00 | 0–100 | 75.00 % | - | | Calc cat total | 100.00 % | 37.50 | 0–40 | 93.75 % | - | | Course total | - | 37.50 | 0–40 | 93.75 % | - | - And I click on "Student 2" in the "user" search widget + And I click on "Student 2" in the "Search users" search combo box 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 % | - | @@ -101,13 +101,13 @@ Feature: Calculated grade items can be used in the gradebook | Min and max grades used in calculation | Initial min and max grades | 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 click on "Student 1" in the "Search users" search combo box And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | grade item 1 | - | 75.00 | 0–100 | 75.00 % | - | | Calc cat total | 100.00 % | 37.50 | 0–40 | 93.75 % | - | | Course total | - | 37.50 | 0–40 | 93.75 % | - | - And I click on "Student 2" in the "user" search widget + And I click on "Student 2" in the "Search users" search combo box 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 % | - | @@ -137,7 +137,7 @@ Feature: Calculated grade items can be used in the gradebook And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" 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 + When I click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | grade item 1 | 66.67 % | 75.00 | 0–100 | 75.00 % | 50.00 % | @@ -151,13 +151,13 @@ Feature: Calculated grade items can be used in the gradebook And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1" 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 click on "Student 1" in the "Search users" search combo box 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 % | 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 click on "Student 2" in the "user" search widget + And I click on "Student 2" in the "Search users" search combo box 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 2157f99c6c7c1..38282e4742486 100644 --- a/grade/tests/behat/grade_calculated_grade_items_20150627.feature +++ b/grade/tests/behat/grade_calculated_grade_items_20150627.feature @@ -42,7 +42,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" 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 click on "Student 1" in the "Search users" search combo box And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | grade item 1 | - | 75.00 | 0–100 | 75.00 % | - | @@ -70,7 +70,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" 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 click on "Student 1" in the "Search users" search combo box And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | grade item 1 | - | 75.00 | 0–100 | 75.00 % | - | @@ -83,13 +83,13 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1" 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 + When I click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | grade item 1 | - | 75.00 | 0–100 | 75.00 % | - | | Calc cat total | 100.00 % | 37.50 | 0–100 | 37.50 % | - | | Course total | - | 37.50 | 0–100 | 37.50 % | - | - And I click on "Student 2" in the "user" search widget + And I click on "Student 2" in the "Search users" search combo box 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 % | - | @@ -100,13 +100,13 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 | Min and max grades used in calculation | Initial min and max grades | 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 click on "Student 1" in the "Search users" search combo box And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | grade item 1 | - | 75.00 | 0–100 | 75.00 % | - | | Calc cat total | 100.00 % | 37.50 | 0–100 | 37.50 % | - | | Course total | - | 37.50 | 0–100 | 37.50 % | - | - And I click on "Student 2" in the "user" search widget + And I click on "Student 2" in the "Search users" search combo box 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 % | - | @@ -136,7 +136,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" 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 + When I click on "Student 1" in the "Search users" search combo box Then 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 % | 75.00 | 0–100 | 75.00 % | 37.50 % | @@ -150,13 +150,13 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506 And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1" 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 click on "Student 1" in the "Search users" search combo box 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 % | 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 click on "Student 2" in the "user" search widget + And I click on "Student 2" in the "Search users" search combo box 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_calculated_weights.feature b/grade/tests/behat/grade_calculated_weights.feature index 6f2179887dcf3..60f149d71042c 100644 --- a/grade/tests/behat/grade_calculated_weights.feature +++ b/grade/tests/behat/grade_calculated_weights.feature @@ -57,7 +57,7 @@ Feature: We can understand the gradebook user report And I set the following settings for grade item "Course 1" of type "course" on "setup" page: | Aggregation | Mean of grades | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box # Check the values in the weights column. Then the following should exist in the "user-grade" table: @@ -82,7 +82,7 @@ Feature: We can understand the gradebook user report And I set the following settings for grade item "Sub category" of type "category" on "setup" page: | Item weight | 1.0 | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box # Check the values in the weights column. Then the following should exist in the "user-grade" table: @@ -103,7 +103,7 @@ Feature: We can understand the gradebook user report And I set the following settings for grade item "Test assignment three" of type "gradeitem" on "setup" page: | Extra credit | 1 | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box # Check the values in the weights column. Then the following should exist in the "user-grade" table: @@ -122,7 +122,7 @@ Feature: We can understand the gradebook user report And I set the following settings for grade item "Test assignment three" of type "gradeitem" on "setup" page: | Extra credit weight | 1.0 | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box # Check the values in the weights column. Then the following should exist in the "user-grade" table: @@ -139,7 +139,7 @@ Feature: We can understand the gradebook user report And I set the following settings for grade item "Course 1" of type "course" on "setup" page: | Aggregation | Median of grades | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box # Check the values in the weights column. Then the following should exist in the "user-grade" table: @@ -156,7 +156,7 @@ Feature: We can understand the gradebook user report And I set the following settings for grade item "Course 1" of type "course" on "setup" page: | Aggregation | Lowest grade | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box # Check the values in the weights column. Then the following should exist in the "user-grade" table: @@ -173,7 +173,7 @@ Feature: We can understand the gradebook user report And I set the following settings for grade item "Course 1" of type "course" on "setup" page: | Aggregation | Highest grade | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box # Check the values in the weights column. Then the following should exist in the "user-grade" table: @@ -190,7 +190,7 @@ Feature: We can understand the gradebook user report And I set the following settings for grade item "Course 1" of type "course" on "setup" page: | Aggregation | Mode of grades | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box # Check the values in the weights column. Then the following should exist in the "user-grade" table: @@ -212,7 +212,7 @@ Feature: We can understand the gradebook user report And I set the following settings for grade item "Test assignment three" of type "gradeitem" on "setup" page: | aggregationcoef | 1 | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box # Check the values in the weights column. Then the following should exist in the "user-grade" table: @@ -231,7 +231,7 @@ Feature: We can understand the gradebook user report And I set the following settings for grade item "Test assignment three" of type "gradeitem" on "setup" page: | Extra credit | 1 | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box # Check the values in the weights column. Then the following should exist in the "user-grade" table: diff --git a/grade/tests/behat/grade_contribution_with_extra_credit.feature b/grade/tests/behat/grade_contribution_with_extra_credit.feature index a4eae0a9e2232..5e29d1376a3f4 100644 --- a/grade/tests/behat/grade_contribution_with_extra_credit.feature +++ b/grade/tests/behat/grade_contribution_with_extra_credit.feature @@ -60,7 +60,7 @@ Feature: Extra credit contributions are normalised when going out of bounds And I set the following settings for grade item "Manual item 4" of type "gradeitem" on "setup" page: | aggregationcoef | 1 | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Contribution to course total | | Manual item 1 | | 80.00 | | diff --git a/grade/tests/behat/grade_grade_minmax_change.feature b/grade/tests/behat/grade_grade_minmax_change.feature index 07724dd1470bf..bfa2384bffce3 100644 --- a/grade/tests/behat/grade_grade_minmax_change.feature +++ b/grade/tests/behat/grade_grade_minmax_change.feature @@ -42,11 +42,11 @@ Feature: We can change the maximum and minimum number of points for manual items | Rescale existing grades | No | | Maximum grade | 10 | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box 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 click on "Student 2" in the "user" search widget + And I click on "Student 2" in the "Search users" search combo box 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 % | @@ -58,11 +58,11 @@ Feature: We can change the maximum and minimum number of points for manual items | Maximum grade | 20 | And I click on "Save" "button" in the "Edit grade item" "dialogue" And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box 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 click on "Student 2" in the "user" search widget + And I click on "Student 2" in the "Search users" search combo box 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 6362959a22fc7..088b84962d37f 100644 --- a/grade/tests/behat/grade_hidden_items.feature +++ b/grade/tests/behat/grade_hidden_items.feature @@ -46,7 +46,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when And I set the following settings for grade item "Test assignment four" of type "gradeitem" on "grader" page: | Hidden | 1 | And I am on the "Course 1" "grades > User report > View" page - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box 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 | diff --git a/grade/tests/behat/grade_hidden_items_locked_category.feature b/grade/tests/behat/grade_hidden_items_locked_category.feature index d3967259e6733..d1e3e2fcf8f9e 100644 --- a/grade/tests/behat/grade_hidden_items_locked_category.feature +++ b/grade/tests/behat/grade_hidden_items_locked_category.feature @@ -39,7 +39,7 @@ Feature: Hidden grade items should be hidden when grade category is locked, but Scenario: Hidden grade items in locked category is hidden for teacher Given I am on the "Course 1" "grades > User report > View" page logged in as teacher1 - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box 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 | diff --git a/grade/tests/behat/grade_mingrade.feature b/grade/tests/behat/grade_mingrade.feature index 32328fedc83be..4dec7f364eedf 100644 --- a/grade/tests/behat/grade_mingrade.feature +++ b/grade/tests/behat/grade_mingrade.feature @@ -63,7 +63,7 @@ Feature: We can use a minimum grade different than zero And I give the grade "50.00" to the user "Student 2" for the grade item "Manual item 6" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Contribution to course total | | Manual item 1 | 18.18 % | -25.00 | -4.55 % | @@ -72,7 +72,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 click on "Student 2" in the "user" search widget + And I click on "Student 2" in the "Search users" search combo box 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 8e8096d16d564..72fad7b84326d 100644 --- a/grade/tests/behat/grade_minmax.feature +++ b/grade/tests/behat/grade_minmax.feature @@ -72,7 +72,7 @@ Feature: We can choose what min or max grade to use when aggregating grades. And I give the grade "10.00" to the user "Student 2" for the grade item "MI 3" 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 click on "Student 1" in the "Search users" search combo box And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | MI 1 | 20.00 % | 75.00 | 0–100 | 75.00 % | 15.00 % | @@ -82,7 +82,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 click on "Student 2" in the "user" search widget + And I click on "Student 2" in the "Search users" search combo box 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 % | @@ -102,7 +102,7 @@ Feature: We can choose what min or max grade to use when aggregating grades. | Maximum grade | 50.00 | | Minimum grade | 5.00 | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box And the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | MI 1 | 12.50 % | 75.00 | 5–50 | 100.00 % | 18.75 % | @@ -112,7 +112,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 click on "Student 2" in the "user" search widget + And I click on "Student 2" in the "Search users" search combo box 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 % | @@ -127,12 +127,12 @@ Feature: We can choose what min or max grade to use when aggregating grades. | Rescale existing grades | No | | Maximum grade | 200.00 | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box And the following should exist in the "user-grade" table: | 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 click on "Student 2" in the "user" search widget + And I click on "Student 2" in the "Search users" search combo box 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 % | @@ -141,7 +141,7 @@ Feature: We can choose what min or max grade to use when aggregating grades. When I set the field "Min and max grades used in calculation" to "Initial min and max grades" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | MI 1 | 16.67 % | 75.00 | 0–100 | 75.00 % | 12.50 % | @@ -151,7 +151,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 click on "Student 2" in the "user" search widget + And I click on "Student 2" in the "Search users" search combo box 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_natural_exclude_empty.feature b/grade/tests/behat/grade_natural_exclude_empty.feature index ae9cca41a814d..a7f325cfe9c5c 100644 --- a/grade/tests/behat/grade_natural_exclude_empty.feature +++ b/grade/tests/behat/grade_natural_exclude_empty.feature @@ -40,7 +40,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 28.57 % | 80.00 | 0–100 | 80.00 % | 22.86 % | @@ -61,7 +61,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 66.67 % | 80.00 | 0–100 | 80.00 % | 53.33 % | @@ -80,7 +80,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 0.00 %( Empty ) | - | 0–100 | - | 0.00 % | @@ -107,7 +107,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 0.00 %( Extra credit ) | 80.00 | 0–100 | 80.00 % | 0.00 % | @@ -132,7 +132,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box 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 % | 40.00 % | @@ -156,7 +156,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 83.33 % | 80.00 | 0–100 | 80.00 % | 66.67 % | @@ -178,7 +178,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 0.00 %( Empty ) | - | 0–100 | - | 0.00 % | @@ -205,7 +205,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box 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 % | 40.00 % | @@ -231,7 +231,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 83.33 % | 80.00 | 0–100 | 80.00 % | 66.67 % | @@ -255,7 +255,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 0.00 %( Empty ) | - | 0–100 | - | 0.00 % | diff --git a/grade/tests/behat/grade_natural_exclude_empty_20150619.feature b/grade/tests/behat/grade_natural_exclude_empty_20150619.feature index 9027455bb4665..b3871d2aec374 100644 --- a/grade/tests/behat/grade_natural_exclude_empty_20150619.feature +++ b/grade/tests/behat/grade_natural_exclude_empty_20150619.feature @@ -41,7 +41,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 28.57 % | 80.00 | 0–100 | 80.00 % | 22.86 % | @@ -62,7 +62,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 66.67 % | 80.00 | 0–100 | 80.00 % | 53.33 % | @@ -81,7 +81,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 0.00 %( Empty ) | - | 0–100 | - | 0.00 % | @@ -108,7 +108,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 0.00 %( Extra credit ) | 80.00 | 0–100 | 80.00 % | 0.00 % | @@ -133,7 +133,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box 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 % | 40.00 % | @@ -158,7 +158,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 83.33 % | 80.00 | 0–100 | 80.00 % | 66.67 % | @@ -181,7 +181,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 0.00 %( Empty ) | - | 0–100 | - | 0.00 % | @@ -208,7 +208,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box 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 % | 40.00 % | @@ -235,7 +235,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 83.33 % | 80.00 | 0–100 | 80.00 % | 66.67 % | @@ -260,7 +260,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619 And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" 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 click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total | | Test assignment one | 0.00 %( Empty ) | - | 0–100 | - | 0.00 % | diff --git a/grade/tests/behat/grade_scales.feature b/grade/tests/behat/grade_scales.feature index 64d126751981b..24d6e7aa9fe9b 100644 --- a/grade/tests/behat/grade_scales.feature +++ b/grade/tests/behat/grade_scales.feature @@ -84,7 +84,7 @@ Feature: View gradebook when scales are used | Range | F–A | 0.00–5.00 | 0.00–5.00 | | Overall average | C | 3.00 | 3.00 | And I navigate to "View > User report" in the course gradebook - And I click on "Student 3" in the "user" search widget + And I click on "Student 3" in the "Search users" search combo box And the following should exist in the "user-grade" table: | Grade item | Grade | Range | Percentage | Contribution to course total | | Test assignment one | C | F–A | 50.00 % | 60.00 % | @@ -127,7 +127,7 @@ Feature: View gradebook when scales are used | Range | F–A | 1.00–5.00 | 0.00–100.00 | | Overall average | C | 3.00 | | And I navigate to "View > User report" in the course gradebook - And I click on "Student 3" in the "user" search widget + And I click on "Student 3" in the "Search users" search combo box And the following should exist in the "user-grade" table: | Grade item | Grade | Range | Percentage | Contribution to course total | | Test assignment one | C | F–A | 50.00 % | | diff --git a/grade/tests/behat/grade_scales_aggregation.feature b/grade/tests/behat/grade_scales_aggregation.feature index 3ce40aa582e9a..5c4b5ef968e08 100644 --- a/grade/tests/behat/grade_scales_aggregation.feature +++ b/grade/tests/behat/grade_scales_aggregation.feature @@ -44,7 +44,7 @@ Feature: Control the aggregation of the scales And I set the following settings for grade item "Course 1" of type "course" on "grader" page: | Aggregation | | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Grade | Percentage | Contribution to course total | | Grade me | 10.00 | 10.00 % | | @@ -55,7 +55,7 @@ Feature: Control the aggregation of the scales And I set the following administration settings values: | grade_includescalesinaggregation | 1 | And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1" - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box And the following should exist in the "user-grade" table: | Grade item | Grade | Percentage | Contribution to course total | | Grade me | 10.00 | 10.00 % | | diff --git a/grade/tests/behat/grade_single_item_scales.feature b/grade/tests/behat/grade_single_item_scales.feature index 18889649ce487..12a113dbec39d 100644 --- a/grade/tests/behat/grade_single_item_scales.feature +++ b/grade/tests/behat/grade_single_item_scales.feature @@ -65,13 +65,13 @@ Feature: View gradebook when single item scales are used | Range | Ace!–Ace! | 0.00–1.00 | 0.00–1.00 | | Overall average | Ace! | 1.00 | 1.00 | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box And the following should exist in the "user-grade" table: | Grade item | Grade | Range | Contribution to course total | | Test assignment one | Ace! | Ace!–Ace! | 100.00 % | | ENFR Sub category 1 total | 1.00 | 0–1 | - | | Course total | 1.00 | 0–1 | - | - And I click on "Student 2" in the "user" search widget + And I click on "Student 2" in the "Search users" search combo box And the following should exist in the "user-grade" table: | Grade item | Grade | Range | Contribution to course total | | Test assignment one | - | Ace!–Ace! | - | @@ -100,7 +100,7 @@ Feature: View gradebook when single item scales are used | Range | Ace!–Ace! | 0.00–100.0 | 0.00–100.00 | | Overall average | Ace! | | | And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box And the following should exist in the "user-grade" table: | Grade item | Grade | Range | Contribution to course total | | Test assignment one | Ace! | Ace!–Ace! | | diff --git a/mod/assign/tests/behat/group_submission.feature b/mod/assign/tests/behat/group_submission.feature index 9ffe92915be94..e0bccf4dd0faf 100644 --- a/mod/assign/tests/behat/group_submission.feature +++ b/mod/assign/tests/behat/group_submission.feature @@ -97,11 +97,11 @@ Feature: Group assignment submissions | student1 | G1 | And I am on the "Test assignment name" "assign activity" page And I follow "View all submissions" - And I click on "Group 1" in the "group" search widget + And I click on "Group 1" in the "Search groups" search combo box And I should see "Group 1" in the "Student 0" "table_row" And I should see "Group 1" in the "Student 1" "table_row" And I should not see "Student 2" - And I click on "All participants" in the "group" search widget + And I click on "All participants" in the "Search groups" search combo box And I should see "Group 1" in the "Student 0" "table_row" And I should see "Group 1" in the "Student 1" "table_row" And I should see "Default group" in the "Student 2" "table_row" diff --git a/mod/h5pactivity/tests/behat/grading_attempts.feature b/mod/h5pactivity/tests/behat/grading_attempts.feature index 8b0de15a8afbc..8ae637b9a989c 100644 --- a/mod/h5pactivity/tests/behat/grading_attempts.feature +++ b/mod/h5pactivity/tests/behat/grading_attempts.feature @@ -37,7 +37,7 @@ Feature: Change grading options in an H5P activity And the field "Grading method" matches value "Highest grade" And I click on "Save and return to course" "button" When I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Grade | Percentage | | Awesome H5P package | 100.00 | 100.00 % | @@ -49,7 +49,7 @@ Feature: Change grading options in an H5P activity | Grading method | First attempt | And I click on "Save and return to course" "button" And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Grade | Percentage | | Awesome H5P package | 0.00 | 0.00 % | @@ -61,7 +61,7 @@ Feature: Change grading options in an H5P activity | Grading method | Last attempt | And I click on "Save and return to course" "button" And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Grade | Percentage | | Awesome H5P package | 0.00 | 0.00 % | @@ -73,7 +73,7 @@ Feature: Change grading options in an H5P activity | Grading method | Average grade | And I click on "Save and return to course" "button" And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Grade | Percentage | | Awesome H5P package | 33.33 | 33.33 % | @@ -85,7 +85,7 @@ Feature: Change grading options in an H5P activity | Grading method | Don't calculate a grade | And I click on "Save and return to course" "button" And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Grade | Percentage | | Awesome H5P package | - | - | @@ -97,7 +97,7 @@ Feature: Change grading options in an H5P activity | Enable attempt tracking | No | And I click on "Save and return to course" "button" And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Grade | Percentage | | Awesome H5P package | - | - | @@ -110,7 +110,7 @@ Feature: Change grading options in an H5P activity | Grading method | Average grade | And I click on "Save and return to course" "button" And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Grade | Range | Percentage | | Awesome H5P package | 33.33 | 0–100 | 33.33 % | @@ -122,7 +122,7 @@ Feature: Change grading options in an H5P activity | Maximum grade | 50 | And I click on "Save and return to course" "button" And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Grade | Range | Percentage | | Awesome H5P package | 16.67 | 0–50 | 33.33 % | @@ -135,7 +135,7 @@ Feature: Change grading options in an H5P activity | Grading method | Average grade | And I click on "Save and return to course" "button" And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Grade | Range | Percentage | | Awesome H5P package | 33.33 | 0–100 | 33.33 % | @@ -147,7 +147,7 @@ Feature: Change grading options in an H5P activity | Maximum grade | 50 | And I click on "Save and return to course" "button" And I navigate to "View > User report" in the course gradebook - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Grade | Range | Percentage | | Awesome H5P package | 33.33 | 0–50 | 66.67 % | diff --git a/mod/h5pactivity/tests/behat/sending_attempt.feature b/mod/h5pactivity/tests/behat/sending_attempt.feature index fa9620a808523..affa0fb356532 100644 --- a/mod/h5pactivity/tests/behat/sending_attempt.feature +++ b/mod/h5pactivity/tests/behat/sending_attempt.feature @@ -80,7 +80,7 @@ Feature: Do a H5P attempt And "3" row "Score" column of "table" table should contain "0" And "4" row "Score" column of "table" table should contain "1" And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1" - And I click on "Student 1" in the "user" search widget + And I click on "Student 1" in the "Search users" search combo box Then the following should exist in the "user-grade" table: | Grade item | Grade | Percentage | | Awesome H5P package | 50.00 | 50.00 % |