diff --git a/user/tests/behat/filter_participants.feature b/user/tests/behat/filter_participants.feature index 68e8063624e..968fbbde56a 100644 --- a/user/tests/behat/filter_participants.feature +++ b/user/tests/behat/filter_participants.feature @@ -166,32 +166,33 @@ Feature: Course participants can be filtered And I should not see "Student 2" in the "participants" "table" And I should not see "Teacher 1" in the "participants" "table" # Search by idnumber (only). - Given I click on ".tag[data-value='student1@example.com']" "css_element" - When I set the field "Filters" to "SID" + And I click on "student1@example.com" "text" in the ".form-autocomplete-selection" "css_element" + And I set the field "Filters" to "SID" And I press key "13" in the field "Filters" - Then I should see "Student 1" in the "participants" "table" + And I should see "Student 1" in the "participants" "table" And I should see "Student 2" in the "participants" "table" And I should see "Student 3" in the "participants" "table" And I should see "Student 4" in the "participants" "table" And I should not see "Teacher 1" in the "participants" "table" # Search by city (only). - Given I click on ".tag[data-value='SID']" "css_element" - When I set the field "Filters" to "SCITY" + And I click on "SID" "text" in the ".form-autocomplete-selection" "css_element" + And I set the field "Filters" to "SCITY" And I press key "13" in the field "Filters" - Then I should see "Student 1" in the "participants" "table" + And I should see "Student 1" in the "participants" "table" And I should see "Student 2" in the "participants" "table" And I should see "Student 3" in the "participants" "table" And I should see "Student 4" in the "participants" "table" And I should not see "Teacher 1" in the "participants" "table" # Search by country text (only) - should not match. - Given I click on ".tag[data-value='SCITY']" "css_element" - When I set the field "Filters" to "GB" + And I click on "SCITY" "text" in the ".form-autocomplete-selection" "css_element" + And I set the field "Filters" to "GB" And I press key "13" in the field "Filters" - Then I should see "Nothing to display" + And I should see "Nothing to display" # Check no match. - Given I set the field "Filters" to "NOTHING" - When I press key "13" in the field "Filters" - Then I should see "Nothing to display" + And I click on "GB" "text" in the ".form-autocomplete-selection" "css_element" + And I set the field "Filters" to "NOTHING" + And I press key "13" in the field "Filters" + And I should see "Nothing to display" @javascript Scenario: Filter by user identity fields when cannot see the field data @@ -213,19 +214,19 @@ Feature: Course participants can be filtered And I should not see "Student 4" in the "participants" "table" And I should see "Teacher 1" in the "participants" "table" # Search for other fields - should only see own results. - Given I click on ".tag[data-value='@example.com']" "css_element" - When I set the field "Filters" to "SID" + And I click on "@example.com" "text" in the ".form-autocomplete-selection" "css_element" + And I set the field "Filters" to "SID" And I press key "13" in the field "Filters" - Then I should see "Nothing to display" - Given I click on ".tag[data-value='SID']" "css_element" - When I set the field "Filters" to "TID" + And I should see "Nothing to display" + And I click on "SID" "text" in the ".form-autocomplete-selection" "css_element" + And I set the field "Filters" to "TID" And I press key "13" in the field "Filters" - Then I should see "Teacher 1" in the "participants" "table" - Given I set the field "Filters" to "CITY" - When I press key "13" in the field "Filters" - Then I should see "Teacher 1" in the "participants" "table" + And I should see "Teacher 1" in the "participants" "table" + And I set the field "Filters" to "CITY" + And I press key "13" in the field "Filters" + And I should see "Teacher 1" in the "participants" "table" And I should not see "Student 1" in the "participants" "table" # Check no match. - Given I set the field "Filters" to "NOTHING" - When I press key "13" in the field "Filters" - Then I should see "Nothing to display" + And I set the field "Filters" to "NOTHING" + And I press key "13" in the field "Filters" + And I should see "Nothing to display"