11Feature : search
2- Background : Create users
3- Given user "search-signer1" exists
4- Given user "search-signer2" exists
5-
62 Scenario : Search account by specific user
73 Given as user "admin"
4+ And user "search-signer1" exists
5+ And user "search-signer2" exists
86 When sending "get" to ocs "/apps/libresign/api/v1/identify-account/search?search=search-signer1"
97 Then the response should have a status code 200
108 And the response should be a JSON array with the following mandatory values
@@ -19,6 +17,8 @@ Feature: search
1917
2018 Scenario : Search account by multiple users
2119 Given as user "admin"
20+ And user "search-signer1" exists
21+ And user "search-signer2" exists
2222 When sending "get" to ocs "/apps/libresign/api/v1/identify-account/search?search=search-signer"
2323 Then the response should have a status code 200
2424 And the response should be a JSON array with the following mandatory values
@@ -40,32 +40,37 @@ Feature: search
4040
4141 Scenario : Search account by herself with partial name search
4242 Given as user "admin"
43- And set the email of user "admin" to "admin@email.tld"
44- When sending "get" to ocs "/apps/libresign/api/v1/identify-account/search?search=adm"
43+ And sending "post" to ocs "/apps/provisioning_api/api/v1/config/apps/libresign/identify_methods"
44+ | value | (string )[{"name ":"account ","enabled ":true }] |
45+ And user "can-find-myself" exists
46+ And run the command "group:adduser admin can-find-myself" with result code 0
47+ And set the email of user "can-find-myself" to "my@email.tld"
48+ When sending "get" to ocs "/apps/libresign/api/v1/identify-account/search?search=can-"
4549 Then the response should have a status code 200
4650 And the response should be a JSON array with the following mandatory values
47- | key | value |
48- | (jq ).ocs .data \|length | 1 |
49- | (jq ).ocs .data [0 ].id | admin |
50- | (jq ).ocs .data [0 ].isNoUser | false |
51- | (jq ).ocs .data [0 ].displayName | admin |
52- | (jq ).ocs .data [0 ].subname | admin @email .tld |
53- | (jq ).ocs .data [0 ].icon | icon -user |
54- | (jq ).ocs .data [0 ].shareType | 0 |
51+ | key | value |
52+ | (jq ).ocs .data \|length | 1 |
53+ | (jq ).ocs .data [0 ].id | can - find - myself |
54+ | (jq ).ocs .data [0 ].isNoUser | false |
55+ | (jq ).ocs .data [0 ].displayName | can - find - myself - displayname |
56+ | (jq ).ocs .data [0 ].subname | my @email .tld |
57+ | (jq ).ocs .data [0 ].icon | icon -user |
58+ | (jq ).ocs .data [0 ].shareType | 0 |
5559
5660 Scenario : Search account by herself without permission to identify by account
5761 Given as user "admin"
5862 And sending "post" to ocs "/apps/provisioning_api/api/v1/config/apps/libresign/identify_methods"
5963 | value | (string )[{"name ":"email ","enabled ":true }] |
60- And set the display name of user "admin" to "Temporary Name"
61- And set the email of user "admin" to "my@email.tld"
62- And sending "get" to ocs "/apps/libresign/api/v1/identify-account/search?search=admin"
64+ Given user "cant-find-myself" exists
65+ And run the command "group:adduser admin cant-find-myself" with result code 0
66+ And set the display name of user "cant-find-myself" to "Temporary Name"
67+ And set the email of user "cant-find-myself" to "my@email.tld"
68+ When as user "cant-find-myself"
69+ And sending "get" to ocs "/apps/libresign/api/v1/identify-account/search?search=cant-find-myself"
6370 Then the response should have a status code 200
6471 And the response should be a JSON array with the following mandatory values
6572 | key | value |
6673 | (jq ).ocs .data \|length | 0 |
67- And set the email of user "admin" to "admin@email.tld"
68- And set the display name of user "admin" to "admin"
6974
7075 Scenario : Search account by herself with permission to identify by account
7176 Given as user "admin"
0 commit comments