1
0

contacts-menu.feature 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. Feature: contacts-menu
  2. Scenario: users can be searched by display name
  3. Given user "user0" exists
  4. And user "user1" exists
  5. And As an "admin"
  6. And sending "PUT" to "/cloud/users/user1" with
  7. | key | displayname |
  8. | value | Test name |
  9. When Logging in using web as "user0"
  10. And searching for contacts matching with "test"
  11. Then the list of searched contacts has "1" contacts
  12. And searched contact "0" is named "Test name"
  13. Scenario: users can be searched by email
  14. Given user "user0" exists
  15. And user "user1" exists
  16. And As an "admin"
  17. And sending "PUT" to "/cloud/users/user1" with
  18. | key | email |
  19. | value | test@example.com |
  20. When Logging in using web as "user0"
  21. And searching for contacts matching with "test"
  22. Then the list of searched contacts has "1" contacts
  23. And searched contact "0" is named "user1"
  24. Scenario: users can not be searched by id
  25. Given user "user0" exists
  26. And user "user1" exists
  27. And As an "admin"
  28. And sending "PUT" to "/cloud/users/user1" with
  29. | key | displayname |
  30. | value | Test name |
  31. When Logging in using web as "user0"
  32. And searching for contacts matching with "user"
  33. Then the list of searched contacts has "0" contacts
  34. Scenario: search several users
  35. Given user "user0" exists
  36. And user "user1" exists
  37. And user "user2" exists
  38. And user "user3" exists
  39. And user "user4" exists
  40. And user "user5" exists
  41. And As an "admin"
  42. And sending "PUT" to "/cloud/users/user1" with
  43. | key | displayname |
  44. | value | Test name |
  45. And sending "PUT" to "/cloud/users/user2" with
  46. | key | email |
  47. | value | test@example.com |
  48. And sending "PUT" to "/cloud/users/user3" with
  49. | key | displayname |
  50. | value | Unmatched name |
  51. And sending "PUT" to "/cloud/users/user4" with
  52. | key | email |
  53. | value | unmatched@example.com |
  54. And sending "PUT" to "/cloud/users/user5" with
  55. | key | displayname |
  56. | value | Another test name |
  57. And sending "PUT" to "/cloud/users/user5" with
  58. | key | email |
  59. | value | another_test@example.com |
  60. When Logging in using web as "user0"
  61. And searching for contacts matching with "test"
  62. Then the list of searched contacts has "3" contacts
  63. # Results are sorted alphabetically
  64. And searched contact "0" is named "Another test name"
  65. And searched contact "1" is named "Test name"
  66. And searched contact "2" is named "user2"
  67. Scenario: users can not be found by display name if visibility is private
  68. Given user "user0" exists
  69. And user "user1" exists
  70. And user "user2" exists
  71. And Logging in using web as "user1"
  72. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  73. | displayname | Test name |
  74. | displaynameScope | private |
  75. And Logging in using web as "user2"
  76. And Sending a "PUT" to "/settings/users/user2/settings" with requesttoken
  77. | displayname | Another test name |
  78. | displaynameScope | contacts |
  79. When Logging in using web as "user0"
  80. And searching for contacts matching with "test"
  81. Then the list of searched contacts has "1" contacts
  82. And searched contact "0" is named "Another test name"
  83. Scenario: users can not be found by email if visibility is private
  84. Given user "user0" exists
  85. And user "user1" exists
  86. And user "user2" exists
  87. And Logging in using web as "user1"
  88. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  89. | email | test@example.com |
  90. | emailScope | private |
  91. And Logging in using web as "user2"
  92. And Sending a "PUT" to "/settings/users/user2/settings" with requesttoken
  93. | email | another_test@example.com |
  94. | emailScope | contacts |
  95. When Logging in using web as "user0"
  96. And searching for contacts matching with "test"
  97. Then the list of searched contacts has "1" contacts
  98. And searched contact "0" is named "user2"
  99. Scenario: users can be found by other properties if the visibility of one is private
  100. Given user "user0" exists
  101. And user "user1" exists
  102. And user "user2" exists
  103. And Logging in using web as "user1"
  104. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  105. | displayname | Test name |
  106. | displaynameScope | contacts |
  107. | email | test@example.com |
  108. | emailScope | private |
  109. And Logging in using web as "user2"
  110. And Sending a "PUT" to "/settings/users/user2/settings" with requesttoken
  111. | displayname | Another test name |
  112. | displaynameScope | private |
  113. | email | another_test@example.com |
  114. | emailScope | contacts |
  115. When Logging in using web as "user0"
  116. And searching for contacts matching with "test"
  117. Then the list of searched contacts has "2" contacts
  118. And searched contact "0" is named ""
  119. And searched contact "1" is named "Test name"
  120. Scenario: users can be searched by display name if visibility is increased again
  121. Given user "user0" exists
  122. And user "user1" exists
  123. And Logging in using web as "user1"
  124. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  125. | displayname | Test name |
  126. | displaynameScope | private |
  127. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  128. | displaynameScope | contacts |
  129. When Logging in using web as "user0"
  130. And searching for contacts matching with "test"
  131. Then the list of searched contacts has "1" contacts
  132. And searched contact "0" is named "Test name"
  133. Scenario: users can be searched by email if visibility is increased again
  134. Given user "user0" exists
  135. And user "user1" exists
  136. And Logging in using web as "user1"
  137. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  138. | email | test@example.com |
  139. | emailScope | private |
  140. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  141. | emailScope | contacts |
  142. When Logging in using web as "user0"
  143. And searching for contacts matching with "test"
  144. Then the list of searched contacts has "1" contacts
  145. And searched contact "0" is named "user1"
  146. Scenario: users can not be searched by display name if visibility is private even if updated with provisioning
  147. Given user "user0" exists
  148. And user "user1" exists
  149. And Logging in using web as "user1"
  150. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  151. | displaynameScope | private |
  152. And As an "admin"
  153. And sending "PUT" to "/cloud/users/user1" with
  154. | key | displayname |
  155. | value | Test name |
  156. When Logging in using web as "user0"
  157. And searching for contacts matching with "test"
  158. Then the list of searched contacts has "0" contacts
  159. Scenario: users can not be searched by email if visibility is private even if updated with provisioning
  160. Given user "user0" exists
  161. And user "user1" exists
  162. And Logging in using web as "user1"
  163. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  164. | emailScope | private |
  165. And As an "admin"
  166. And sending "PUT" to "/cloud/users/user1" with
  167. | key | email |
  168. | value | test@example.com |
  169. When Logging in using web as "user0"
  170. And searching for contacts matching with "test"
  171. Then the list of searched contacts has "0" contacts