forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-63379 user: Fix Behat tests for participants filtering
- Loading branch information
1 parent
674ef9b
commit 8420b61
Showing
1 changed file
with
25 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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='[email protected]']" "css_element" | ||
When I set the field "Filters" to "SID" | ||
And I click on "[email protected]" "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" |