transfer-ownership.feature 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. Feature: transfer-ownership
  2. Scenario: transfering ownership of a file
  3. Given user "user0" exists
  4. And user "user1" exists
  5. And User "user0" uploads file "data/textfile.txt" to "/somefile.txt"
  6. When transfering ownership from "user0" to "user1"
  7. And the command was successful
  8. And As an "user1"
  9. And using received transfer folder of "user1" as dav path
  10. Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is"
  11. Scenario: transfering ownership of a folder
  12. Given user "user0" exists
  13. And user "user1" exists
  14. And User "user0" created a folder "/test"
  15. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  16. When transfering ownership from "user0" to "user1"
  17. And the command was successful
  18. And As an "user1"
  19. And using received transfer folder of "user1" as dav path
  20. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  21. Scenario: transfering ownership of file shares
  22. Given user "user0" exists
  23. And user "user1" exists
  24. And user "user2" exists
  25. And User "user0" uploads file "data/textfile.txt" to "/somefile.txt"
  26. And file "/somefile.txt" of user "user0" is shared with user "user2" with permissions 19
  27. When transfering ownership from "user0" to "user1"
  28. And the command was successful
  29. And As an "user2"
  30. Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is"
  31. Scenario: transfering ownership of folder shared with third user
  32. Given user "user0" exists
  33. And user "user1" exists
  34. And user "user2" exists
  35. And User "user0" created a folder "/test"
  36. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  37. And folder "/test" of user "user0" is shared with user "user2" with permissions 31
  38. When transfering ownership from "user0" to "user1"
  39. And the command was successful
  40. And As an "user2"
  41. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  42. Scenario: transfering ownership of folder shared with transfer recipient
  43. Given user "user0" exists
  44. And user "user1" exists
  45. And User "user0" created a folder "/test"
  46. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  47. And folder "/test" of user "user0" is shared with user "user1" with permissions 31
  48. When transfering ownership from "user0" to "user1"
  49. And the command was successful
  50. And As an "user1"
  51. Then as "user1" the folder "/test" does not exist
  52. And using received transfer folder of "user1" as dav path
  53. And Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  54. Scenario: transfering ownership of folder doubly shared with third user
  55. Given group "group1" exists
  56. And user "user0" exists
  57. And user "user1" exists
  58. And user "user2" exists
  59. And user "user2" belongs to group "group1"
  60. And User "user0" created a folder "/test"
  61. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  62. And folder "/test" of user "user0" is shared with group "group1" with permissions 31
  63. And folder "/test" of user "user0" is shared with user "user2" with permissions 31
  64. When transfering ownership from "user0" to "user1"
  65. And the command was successful
  66. And As an "user2"
  67. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  68. Scenario: transfering ownership does not transfer received shares
  69. Given user "user0" exists
  70. And user "user1" exists
  71. And user "user2" exists
  72. And User "user2" created a folder "/test"
  73. And folder "/test" of user "user2" is shared with user "user0" with permissions 31
  74. When transfering ownership from "user0" to "user1"
  75. And the command was successful
  76. And As an "user1"
  77. And using received transfer folder of "user1" as dav path
  78. Then as "user1" the folder "/test" does not exist
  79. @local_storage
  80. Scenario: transfering ownership does not transfer external storage
  81. Given user "user0" exists
  82. And user "user1" exists
  83. When transfering ownership from "user0" to "user1"
  84. And the command was successful
  85. And As an "user1"
  86. And using received transfer folder of "user1" as dav path
  87. Then as "user1" the folder "/local_storage" does not exist
  88. Scenario: transfering ownership does not fail with shared trashed files
  89. Given user "user0" exists
  90. And user "user1" exists
  91. And user "user2" exists
  92. And User "user0" created a folder "/sub"
  93. And User "user0" created a folder "/sub/test"
  94. And folder "/sub/test" of user "user0" is shared with user "user2" with permissions 31
  95. And User "user0" deletes folder "/sub"
  96. When transfering ownership from "user0" to "user1"
  97. Then the command was successful
  98. Scenario: transfering ownership fails with invalid source user
  99. Given user "user0" exists
  100. When transfering ownership from "invalid_user" to "user0"
  101. Then the command error output contains the text "Unknown source user"
  102. And the command failed with exit code 1
  103. Scenario: transfering ownership fails with invalid target user
  104. Given user "user0" exists
  105. When transfering ownership from "user0" to "invalid_user"
  106. Then the command error output contains the text "Unknown target user"
  107. And the command failed with exit code 1
  108. Scenario: transfering ownership of a folder
  109. Given user "user0" exists
  110. And user "user1" exists
  111. And User "user0" created a folder "/test"
  112. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  113. When transfering ownership of path "test" from "user0" to "user1"
  114. And the command was successful
  115. And As an "user1"
  116. And using received transfer folder of "user1" as dav path
  117. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  118. Scenario: transfering ownership of file shares
  119. Given user "user0" exists
  120. And user "user1" exists
  121. And user "user2" exists
  122. And User "user0" created a folder "/test"
  123. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  124. And file "/test/somefile.txt" of user "user0" is shared with user "user2" with permissions 19
  125. When transfering ownership of path "test" from "user0" to "user1"
  126. And the command was successful
  127. And As an "user2"
  128. Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is"
  129. Scenario: transfering ownership of folder shared with third user
  130. Given user "user0" exists
  131. And user "user1" exists
  132. And user "user2" exists
  133. And User "user0" created a folder "/test"
  134. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  135. And folder "/test" of user "user0" is shared with user "user2" with permissions 31
  136. When transfering ownership of path "test" from "user0" to "user1"
  137. And the command was successful
  138. And As an "user2"
  139. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  140. Scenario: transfering ownership of folder shared with transfer recipient
  141. Given user "user0" exists
  142. And user "user1" exists
  143. And User "user0" created a folder "/test"
  144. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  145. And folder "/test" of user "user0" is shared with user "user1" with permissions 31
  146. When transfering ownership of path "test" from "user0" to "user1"
  147. And the command was successful
  148. And As an "user1"
  149. Then as "user1" the folder "/test" does not exist
  150. And using received transfer folder of "user1" as dav path
  151. And Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  152. Scenario: transfering ownership of folder doubly shared with third user
  153. Given group "group1" exists
  154. And user "user0" exists
  155. And user "user1" exists
  156. And user "user2" exists
  157. And user "user2" belongs to group "group1"
  158. And User "user0" created a folder "/test"
  159. And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt"
  160. And folder "/test" of user "user0" is shared with group "group1" with permissions 31
  161. And folder "/test" of user "user0" is shared with user "user2" with permissions 31
  162. When transfering ownership of path "test" from "user0" to "user1"
  163. And the command was successful
  164. And As an "user2"
  165. Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
  166. Scenario: transfering ownership does not transfer received shares
  167. Given user "user0" exists
  168. And user "user1" exists
  169. And user "user2" exists
  170. And User "user2" created a folder "/test"
  171. And User "user0" created a folder "/sub"
  172. And folder "/test" of user "user2" is shared with user "user0" with permissions 31
  173. And User "user0" moved folder "/test" to "/sub/test"
  174. When transfering ownership of path "sub" from "user0" to "user1"
  175. And the command was successful
  176. And As an "user1"
  177. And using received transfer folder of "user1" as dav path
  178. Then as "user1" the folder "/sub/test" does not exist
  179. Scenario: transfering ownership does not transfer external storage
  180. Given user "user0" exists
  181. And user "user1" exists
  182. And User "user0" created a folder "/sub"
  183. When transfering ownership of path "sub" from "user0" to "user1"
  184. And the command was successful
  185. And As an "user1"
  186. And using received transfer folder of "user1" as dav path
  187. Then as "user1" the folder "/local_storage" does not exist
  188. Scenario: transfering ownership fails with invalid source user
  189. Given user "user0" exists
  190. And User "user0" created a folder "/sub"
  191. When transfering ownership of path "sub" from "invalid_user" to "user0"
  192. Then the command error output contains the text "Unknown source user"
  193. And the command failed with exit code 1
  194. Scenario: transfering ownership fails with invalid target user
  195. Given user "user0" exists
  196. And User "user0" created a folder "/sub"
  197. When transfering ownership of path "sub" from "user0" to "invalid_user"
  198. Then the command error output contains the text "Unknown target user"
  199. And the command failed with exit code 1
  200. Scenario: transfering ownership fails with invalid path
  201. Given user "user0" exists
  202. And user "user1" exists
  203. When transfering ownership of path "test" from "user0" to "user1"
  204. Then the command error output contains the text "Unknown target user"
  205. And the command failed with exit code 1