contacts-menu.feature 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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. # Disabled because it regularly fails on drone:
  82. # Then the list of searched contacts has "1" contacts
  83. # And searched contact "0" is named "Another test name"
  84. Scenario: users can not be found by email if visibility is private
  85. Given user "user0" exists
  86. And user "user1" exists
  87. And user "user2" exists
  88. And Logging in using web as "user1"
  89. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  90. | email | test@example.com |
  91. | emailScope | private |
  92. And Logging in using web as "user2"
  93. And Sending a "PUT" to "/settings/users/user2/settings" with requesttoken
  94. | email | another_test@example.com |
  95. | emailScope | contacts |
  96. # Disabled because it regularly fails on drone:
  97. # When Logging in using web as "user0"
  98. # And searching for contacts matching with "test"
  99. # Then the list of searched contacts has "1" contacts
  100. # And searched contact "0" is named "user2"
  101. Scenario: users can be found by other properties if the visibility of one is private
  102. Given user "user0" exists
  103. And user "user1" exists
  104. And user "user2" exists
  105. And Logging in using web as "user1"
  106. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  107. | displayname | Test name |
  108. | displaynameScope | contacts |
  109. | email | test@example.com |
  110. | emailScope | private |
  111. And Logging in using web as "user2"
  112. And Sending a "PUT" to "/settings/users/user2/settings" with requesttoken
  113. | displayname | Another test name |
  114. | displaynameScope | private |
  115. | email | another_test@example.com |
  116. | emailScope | contacts |
  117. When Logging in using web as "user0"
  118. And searching for contacts matching with "test"
  119. Then the list of searched contacts has "2" contacts
  120. # Disabled because it regularly fails on drone:
  121. # And searched contact "0" is named ""
  122. And searched contact "1" is named "Test name"
  123. Scenario: users can be searched by display name if visibility is increased again
  124. Given user "user0" exists
  125. And user "user1" exists
  126. And Logging in using web as "user1"
  127. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  128. | displayname | Test name |
  129. | displaynameScope | private |
  130. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  131. | displaynameScope | contacts |
  132. When Logging in using web as "user0"
  133. And searching for contacts matching with "test"
  134. Then the list of searched contacts has "1" contacts
  135. And searched contact "0" is named "Test name"
  136. Scenario: users can be searched by email if visibility is increased again
  137. Given user "user0" exists
  138. And user "user1" exists
  139. And Logging in using web as "user1"
  140. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  141. | email | test@example.com |
  142. | emailScope | private |
  143. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  144. | emailScope | contacts |
  145. # Disabled because it regularly fails on drone:
  146. # When Logging in using web as "user0"
  147. # And searching for contacts matching with "test"
  148. # Then the list of searched contacts has "1" contacts
  149. # And searched contact "0" is named "user1"
  150. Scenario: users can not be searched by display name if visibility is private even if updated with provisioning
  151. Given user "user0" exists
  152. And user "user1" exists
  153. And Logging in using web as "user1"
  154. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  155. | displaynameScope | private |
  156. And As an "admin"
  157. And sending "PUT" to "/cloud/users/user1" with
  158. | key | displayname |
  159. | value | Test name |
  160. When Logging in using web as "user0"
  161. And searching for contacts matching with "test"
  162. # Disabled because it regularly fails on drone:
  163. # Then the list of searched contacts has "0" contacts
  164. Scenario: users can not be searched by email if visibility is private even if updated with provisioning
  165. Given user "user0" exists
  166. And user "user1" exists
  167. And Logging in using web as "user1"
  168. And Sending a "PUT" to "/settings/users/user1/settings" with requesttoken
  169. | emailScope | private |
  170. And As an "admin"
  171. And sending "PUT" to "/cloud/users/user1" with
  172. | key | email |
  173. | value | test@example.com |
  174. When Logging in using web as "user0"
  175. And searching for contacts matching with "test"
  176. # Disabled because it regularly fails on drone:
  177. # Then the list of searched contacts has "0" contacts