From 6a4865b90adf8880bbf3690ac45717e89fd02b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Fri, 26 Sep 2025 18:18:34 +0200 Subject: [PATCH] test: Add tests to get user autocompletes similar to the email ones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Calviño Sánchez --- .../autocomplete.feature | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/build/integration/collaboration_features/autocomplete.feature b/build/integration/collaboration_features/autocomplete.feature index 115241e7873..ddbf9a6aab7 100644 --- a/build/integration/collaboration_features/autocomplete.feature +++ b/build/integration/collaboration_features/autocomplete.feature @@ -41,6 +41,61 @@ 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 | + + 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 | + Scenario: getting autocomplete emails from address book with enumeration Given As an "admin" And sending "PUT" to "/cloud/users/autocomplete" with