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-69107 user: Fix autocomplete usages
- Loading branch information
1 parent
f07d3b7
commit 31402aa
Showing
19 changed files
with
614 additions
and
393 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
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
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
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
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
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 |
---|---|---|
|
@@ -130,18 +130,17 @@ Feature: Teacher can search and enrol users one by one into the course | |
Scenario: Searching for a non-existing user | ||
Given I navigate to course participants | ||
And I press "Enrol users" | ||
And I set the field "Select users" to "qwertyuiop" | ||
And I click on ".form-autocomplete-downarrow" "css_element" in the "Select users" "form_row" | ||
And I click on "Select users" "field" | ||
And I type "qwertyuiop" | ||
Then I should see "No suggestions" | ||
|
||
@javascript | ||
Scenario: If there are less than 100 matching users, all are displayed for selection | ||
Given I navigate to course participants | ||
And I press "Enrol users" | ||
When I set the field "Select users" to "example.com" | ||
And I click on ".form-autocomplete-downarrow" "css_element" in the "Select users" "form_row" | ||
And I click on "Student 099" item in the autocomplete list | ||
Then I should see "Student 099" | ||
When I click on "Select users" "field" | ||
And I type "example.com" | ||
Then "Student 099" "autocomplete_suggestions" should exist | ||
|
||
@javascript | ||
Scenario: If there are more than 100 matching users, inform there are too many. | ||
|
@@ -151,8 +150,8 @@ Feature: Teacher can search and enrol users one by one into the course | |
| student101 | Student | 101 | student101@example.com | | ||
And I navigate to course participants | ||
And I press "Enrol users" | ||
When I set the field "Select users" to "example.com" | ||
And I click on ".form-autocomplete-downarrow" "css_element" in the "Select users" "form_row" | ||
When I click on "Select users" "field" | ||
And I type "example.com" | ||
Then I should see "Too many users (>100) to show" | ||
|
||
@javascript | ||
|
@@ -161,8 +160,8 @@ Feature: Teacher can search and enrol users one by one into the course | |
| maxusersperpage | 5 | | ||
And I navigate to course participants | ||
And I press "Enrol users" | ||
When I set the field "Select users" to "student00" | ||
And I click on ".form-autocomplete-downarrow" "css_element" in the "Select users" "form_row" | ||
When I click on "Select users" "field" | ||
And I type "student00" | ||
Then I should see "Too many users (>5) to show" | ||
|
||
@javascript | ||
|
@@ -177,18 +176,18 @@ Feature: Teacher can search and enrol users one by one into the course | |
When I am on "Course 001" course homepage | ||
Then I navigate to course participants | ||
And I press "Enrol users" | ||
When I set the field "Select users" to "[email protected]" | ||
And I click on ".form-autocomplete-downarrow" "css_element" in the "Select users" "form_row" | ||
And I click on "Select users" "field" | ||
And I type "[email protected]" | ||
Then I should see "[email protected], CITY1, GB, 1234567892, 1234567893, ABC1, ABC2" | ||
# Remove identity field in setting User policies | ||
And the following config values are set as admin: | ||
| showuseridentity | idnumber,email,phone1,phone2,department,institution | | ||
When I am on "Course 001" course homepage | ||
And I am on "Course 001" course homepage | ||
And I navigate to course participants | ||
And I press "Enrol users" | ||
When I set the field "Select users" to "[email protected]" | ||
And I click on ".form-autocomplete-downarrow" "css_element" in the "Select users" "form_row" | ||
Then I should see "[email protected], 1234567892, 1234567893, ABC1, ABC2" | ||
And I click on "Select users" "field" | ||
And I type "[email protected]" | ||
And I should see "[email protected], 1234567892, 1234567893, ABC1, ABC2" | ||
|
||
# The following tests are commented out as a result of MDL-66339. | ||
# @javascript | ||
|
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 |
---|---|---|
|
@@ -50,15 +50,12 @@ Feature: Organize students into groups | |
And the "members" select box should not contain "Student 1 ([email protected])" | ||
And I navigate to course participants | ||
And I set the field "type" in the "Filter 1" "fieldset" to "Groups" | ||
And I click on ".form-autocomplete-downarrow" "css_element" in the "Filter 1" "fieldset" | ||
And I click on "Group 1" "list_item" | ||
And I set the field "Type or select..." in the "Filter 1" "fieldset" to "Group 1" | ||
And I click on "Apply filters" "button" | ||
And I should see "Student 0" | ||
And I should see "Student 1" | ||
And I should not see "Student 2" | ||
And I click on "Group 1" "autocomplete_selection" | ||
And I click on ".form-autocomplete-downarrow" "css_element" in the "Filter 1" "fieldset" | ||
And I click on "Group 2" "list_item" | ||
And I set the field "Type or select..." in the "Filter 1" "fieldset" to "Group 2" | ||
And I click on "Apply filters" "button" | ||
And I should see "Student 2" | ||
And I should see "Student 3" | ||
|
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
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
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
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
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
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
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
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
Oops, something went wrong.