MDL-79541 gradereport_user: Fix indentation in Behat.

This commit is contained in:
Ilya Tregubov 2024-08-07 11:43:46 +08:00 committed by Jenkins
parent 3c86ca2865
commit 647b15d5ac

View File

@ -196,25 +196,25 @@ Feature: Within the User report, a teacher can search for users.
And "Turtle Manatee" "heading" should exist
And "Teacher 1" "heading" should not exist
Scenario: A teacher can only search for fields that he allowed to see
Given the following "permission overrides" exist:
| capability | permission | role | contextlevel | reference |
| moodle/course:viewhiddenuserfields | Prohibit | editingteacher | System | |
And the following config values are set as admin:
| hiddenuserfields | email |
And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1"
When I set the field "Search users" to "User"
And "View all results (5)" "option_role" should 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
# Email is not shown in results.
And I confirm "User" exists in the "Search users" search combo box
And I confirm "example.com" does not exist in the "Search users" search combo box
# Email is not searchable.
And I set the field "Search users" to "student5@example.com"
And "View all results (5)" "option_role" should not exist
And I confirm "No results for \"student5@example.com\"" exists in the "Search users" search combo box
Scenario: A teacher can only search for fields that he allowed to see
Given the following "permission overrides" exist:
| capability | permission | role | contextlevel | reference |
| moodle/course:viewhiddenuserfields | Prohibit | editingteacher | System | |
And the following config values are set as admin:
| hiddenuserfields | email |
And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1"
When I set the field "Search users" to "User"
And "View all results (5)" "option_role" should 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
# Email is not shown in results.
And I confirm "User" exists in the "Search users" search combo box
And I confirm "example.com" does not exist in the "Search users" search combo box
# Email is not searchable.
And I set the field "Search users" to "student5@example.com"
And "View all results (5)" "option_role" should not exist
And I confirm "No results for \"student5@example.com\"" exists in the "Search users" search combo box
@accessibility
Scenario: A teacher can set focus and search using the input are with a keyboard