mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
test: Add tests to get user autocompletes similar to the email ones
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
e28e1e2ea6
commit
23a6e7aa4f
1 changed files with 57 additions and 0 deletions
|
|
@ -41,6 +41,63 @@ Feature: autocomplete
|
|||
Then get autocomplete for "autocomplete"
|
||||
| id | source |
|
||||
|
||||
Scenario: getting autocomplete from address book with enumeration
|
||||
Given As an "admin"
|
||||
And sending "PUT" to "/cloud/users/autocomplete" with
|
||||
| key | email |
|
||||
| value | autocomplete@example.com |
|
||||
And there is a contact in an addressbook
|
||||
When parameter "shareapi_restrict_user_enumeration_full_match" of app "core" is set to "no"
|
||||
Then get autocomplete for "auto"
|
||||
| id | source |
|
||||
| auto | users |
|
||||
| autocomplete | users |
|
||||
| autocomplete2 | users |
|
||||
Then get autocomplete for "example"
|
||||
| id | source |
|
||||
| autocomplete | users |
|
||||
Then get autocomplete for "autocomplete@example.com"
|
||||
| id | source |
|
||||
| autocomplete | users |
|
||||
When parameter "shareapi_restrict_user_enumeration_full_match" of app "core" is set to "yes"
|
||||
Then get autocomplete for "auto"
|
||||
| id | source |
|
||||
| auto | users |
|
||||
| autocomplete | users |
|
||||
| autocomplete2 | users |
|
||||
Then get autocomplete for "example"
|
||||
| id | source |
|
||||
| autocomplete | users |
|
||||
Then get autocomplete for "autocomplete@example.com"
|
||||
| id | source |
|
||||
| autocomplete | users |
|
||||
| autocomplete | users |
|
||||
|
||||
Scenario: getting autocomplete from address book without enumeration
|
||||
Given As an "admin"
|
||||
And sending "PUT" to "/cloud/users/autocomplete" with
|
||||
| key | email |
|
||||
| value | autocomplete@example.com |
|
||||
And there is a contact in an addressbook
|
||||
And parameter "shareapi_allow_share_dialog_user_enumeration" of app "core" is set to "no"
|
||||
When parameter "shareapi_restrict_user_enumeration_full_match" of app "core" is set to "no"
|
||||
Then get autocomplete for "auto"
|
||||
| id | source |
|
||||
Then get autocomplete for "example"
|
||||
| id | source |
|
||||
Then get autocomplete for "autocomplete@example.com"
|
||||
| id | source |
|
||||
When parameter "shareapi_restrict_user_enumeration_full_match" of app "core" is set to "yes"
|
||||
Then get autocomplete for "auto"
|
||||
| id | source |
|
||||
| auto | users |
|
||||
Then get autocomplete for "example"
|
||||
| id | source |
|
||||
Then get autocomplete for "autocomplete@example.com"
|
||||
| id | source |
|
||||
| autocomplete | users |
|
||||
| autocomplete | users |
|
||||
|
||||
Scenario: getting autocomplete emails from address book with enumeration
|
||||
Given As an "admin"
|
||||
And sending "PUT" to "/cloud/users/autocomplete" with
|
||||
|
|
|
|||
Loading…
Reference in a new issue