You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

app-files-sharing.feature 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. Feature: app-files-sharing
  2. Scenario: share a file with another user
  3. Given I act as John
  4. And I am logged in as the admin
  5. And I act as Jane
  6. And I am logged in
  7. And I act as John
  8. And I rename "welcome.txt" to "farewell.txt"
  9. And I see that the file list contains a file named "farewell.txt"
  10. When I share "farewell.txt" with "user0"
  11. And I see that the file is shared with "user0"
  12. And I act as Jane
  13. # The Files app is open again to reload the file list
  14. And I open the Files app
  15. Then I see that the file list contains a file named "farewell.txt"
  16. And I open the details view for "farewell.txt"
  17. And I see that the details view is open
  18. And I open the "Sharing" tab in the details view
  19. And I see that the "Sharing" tab in the details view is eventually loaded
  20. And I see that the file is shared with me by "admin"
  21. Scenario: share a file with another user who already has a file with that name
  22. Given I act as John
  23. And I am logged in as the admin
  24. And I act as Jane
  25. And I am logged in
  26. And I act as John
  27. When I share "welcome.txt" with "user0"
  28. And I see that the file is shared with "user0"
  29. And I act as Jane
  30. # The Files app is open again to reload the file list
  31. And I open the Files app
  32. Then I see that the file list contains a file named "welcome (2).txt"
  33. And I open the details view for "welcome (2).txt"
  34. And I see that the details view is open
  35. And I open the "Sharing" tab in the details view
  36. And I see that the "Sharing" tab in the details view is eventually loaded
  37. And I see that the file is shared with me by "admin"
  38. Scenario: share a skeleton file with another user before first login
  39. # If a file is shared with a user before her first login the skeleton would
  40. # not have been created, so if the shared file has the same name as one from
  41. # the skeleton the shared file will take its place and the skeleton file
  42. # will not be added.
  43. Given I act as John
  44. And I am logged in as the admin
  45. When I share "welcome.txt" with "user0"
  46. And I see that the file is shared with "user0"
  47. And I act as Jane
  48. And I am logged in
  49. Then I see that the file list contains a file named "welcome.txt"
  50. And I open the details view for "welcome.txt"
  51. And I see that the details view is open
  52. And I open the "Sharing" tab in the details view
  53. And I see that the "Sharing" tab in the details view is eventually loaded
  54. And I see that the file is shared with me by "admin"
  55. Scenario: reshare a file with another user
  56. Given I act as John
  57. And I am logged in as the admin
  58. And I act as Jane
  59. And I am logged in
  60. And I act as Jim
  61. And I am logged in as "user1"
  62. And I act as John
  63. And I rename "welcome.txt" to "farewell.txt"
  64. And I see that the file list contains a file named "farewell.txt"
  65. And I share "farewell.txt" with "user0"
  66. And I see that the file is shared with "user0"
  67. And I act as Jane
  68. # The Files app is open again to reload the file list
  69. And I open the Files app
  70. When I share "farewell.txt" with "user1"
  71. And I see that the file is shared with "user1"
  72. And I act as Jim
  73. # The Files app is open again to reload the file list
  74. And I open the Files app
  75. Then I see that the file list contains a file named "farewell.txt"
  76. And I open the details view for "farewell.txt"
  77. And I see that the details view is open
  78. And I open the "Sharing" tab in the details view
  79. And I see that the "Sharing" tab in the details view is eventually loaded
  80. And I see that the file is shared with me by "user0"
  81. Scenario: owner sees reshares with other users
  82. Given I act as John
  83. And I am logged in as the admin
  84. And I act as Jane
  85. And I am logged in
  86. And I act as John
  87. And I rename "welcome.txt" to "farewell.txt"
  88. And I see that the file list contains a file named "farewell.txt"
  89. And I share "farewell.txt" with "user0"
  90. And I see that the file is shared with "user0"
  91. And I act as Jane
  92. # The Files app is open again to reload the file list
  93. And I open the Files app
  94. And I share "farewell.txt" with "user1"
  95. And I see that the file is shared with "user1"
  96. When I act as John
  97. # The Files app is open again to reload the file list and the shares
  98. And I open the Files app
  99. And I open the details view for "farewell.txt"
  100. And I see that the details view is open
  101. And I open the "Sharing" tab in the details view
  102. And I see that the "Sharing" tab in the details view is eventually loaded
  103. Then I see that the file is shared with "user0"
  104. And I see that the file is shared with "user1"
  105. Scenario: share an empty folder with another user
  106. Given I act as John
  107. And I am logged in as the admin
  108. And I act as Jane
  109. And I am logged in
  110. And I act as John
  111. And I create a new folder named "Shared folder"
  112. And I see that the file list contains a file named "Shared folder"
  113. When I share "Shared folder" with "user0"
  114. And I see that the file is shared with "user0"
  115. And I act as Jane
  116. # The Files app is open again to reload the file list
  117. And I open the Files app
  118. Then I see that the file list contains a file named "Shared folder"
  119. And I open the details view for "Shared folder"
  120. And I see that the details view is open
  121. And I open the "Sharing" tab in the details view
  122. And I see that the "Sharing" tab in the details view is eventually loaded
  123. And I see that the file is shared with me by "admin"
  124. Scenario: sharee sees a folder created by the owner in a shared folder
  125. Given I act as John
  126. And I am logged in as the admin
  127. And I act as Jane
  128. And I am logged in
  129. And I act as John
  130. And I create a new folder named "Shared folder"
  131. And I see that the file list contains a file named "Shared folder"
  132. And I share "Shared folder" with "user0"
  133. And I see that the file is shared with "user0"
  134. And I enter in the folder named "Shared folder"
  135. And I create a new folder named "Subfolder"
  136. And I see that the file list contains a file named "Subfolder"
  137. When I act as Jane
  138. # The Files app is open again to reload the file list
  139. And I open the Files app
  140. And I enter in the folder named "Shared folder"
  141. Then I see that the file list contains a file named "Subfolder"
  142. Scenario: owner sees a folder created by the sharee in a shared folder
  143. Given I act as John
  144. And I am logged in as the admin
  145. And I act as Jane
  146. And I am logged in
  147. And I act as John
  148. And I create a new folder named "Shared folder"
  149. And I see that the file list contains a file named "Shared folder"
  150. And I share "Shared folder" with "user0"
  151. And I see that the file is shared with "user0"
  152. And I act as Jane
  153. # The Files app is open again to reload the file list
  154. And I open the Files app
  155. And I enter in the folder named "Shared folder"
  156. And I create a new folder named "Subfolder"
  157. And I see that the file list contains a file named "Subfolder"
  158. When I act as John
  159. And I enter in the folder named "Shared folder"
  160. Then I see that the file list contains a file named "Subfolder"
  161. Scenario: resharee sees a folder created by the owner in a shared folder
  162. Given I act as John
  163. And I am logged in as the admin
  164. And I act as Jane
  165. And I am logged in
  166. And I act as Jim
  167. And I am logged in as "user1"
  168. And I act as John
  169. And I create a new folder named "Shared folder"
  170. And I see that the file list contains a file named "Shared folder"
  171. And I share "Shared folder" with "user0"
  172. And I see that the file is shared with "user0"
  173. And I act as Jane
  174. # The Files app is open again to reload the file list
  175. And I open the Files app
  176. And I share "Shared folder" with "user1"
  177. And I act as John
  178. And I enter in the folder named "Shared folder"
  179. And I create a new folder named "Subfolder"
  180. And I see that the file list contains a file named "Subfolder"
  181. When I act as Jim
  182. # The Files app is open again to reload the file list
  183. And I open the Files app
  184. And I enter in the folder named "Shared folder"
  185. Then I see that the file list contains a file named "Subfolder"
  186. Scenario: owner sees a folder created by the resharee in a shared folder
  187. Given I act as John
  188. And I am logged in as the admin
  189. And I act as Jane
  190. And I am logged in
  191. And I act as Jim
  192. And I am logged in as "user1"
  193. And I act as John
  194. And I create a new folder named "Shared folder"
  195. And I see that the file list contains a file named "Shared folder"
  196. And I share "Shared folder" with "user0"
  197. And I see that the file is shared with "user0"
  198. And I act as Jane
  199. # The Files app is open again to reload the file list
  200. And I open the Files app
  201. And I share "Shared folder" with "user1"
  202. And I act as Jim
  203. # The Files app is open again to reload the file list
  204. And I open the Files app
  205. And I enter in the folder named "Shared folder"
  206. And I create a new folder named "Subfolder"
  207. And I see that the file list contains a file named "Subfolder"
  208. When I act as John
  209. And I enter in the folder named "Shared folder"
  210. Then I see that the file list contains a file named "Subfolder"
  211. Scenario: sharee can not reshare a folder if the sharer disables it
  212. Given I act as John
  213. And I am logged in as the admin
  214. And I act as Jane
  215. And I am logged in
  216. And I act as John
  217. And I create a new folder named "Shared folder"
  218. And I see that the file list contains a file named "Shared folder"
  219. And I share "Shared folder" with "user0"
  220. And I see that the file is shared with "user0"
  221. And I set the share with "user0" as not reshareable
  222. And I see that "user0" can not reshare the share
  223. When I act as Jane
  224. # The Files app is open again to reload the file list
  225. And I open the Files app
  226. Then I see that the file list contains a file named "Shared folder"
  227. And I open the details view for "Shared folder"
  228. And I see that the details view is open
  229. And I open the "Sharing" tab in the details view
  230. And I see that the "Sharing" tab in the details view is eventually loaded
  231. And I see that the file is shared with me by "admin"
  232. And I see that resharing the file is not allowed
  233. Scenario: sharee can not reshare a subfolder if the sharer disables it for the parent folder
  234. Given I act as John
  235. And I am logged in as the admin
  236. And I act as Jane
  237. And I am logged in
  238. And I act as John
  239. And I create a new folder named "Shared folder"
  240. And I see that the file list contains a file named "Shared folder"
  241. And I share "Shared folder" with "user0"
  242. And I see that the file is shared with "user0"
  243. And I set the share with "user0" as not reshareable
  244. And I see that "user0" can not reshare the share
  245. And I enter in the folder named "Shared folder"
  246. And I create a new folder named "Subfolder"
  247. And I see that the file list contains a file named "Subfolder"
  248. When I act as Jane
  249. # The Files app is open again to reload the file list
  250. And I open the Files app
  251. And I enter in the folder named "Shared folder"
  252. Then I see that the file list contains a file named "Subfolder"
  253. And I open the details view for "Subfolder"
  254. And I see that the details view is open
  255. And I open the "Sharing" tab in the details view
  256. And I see that the "Sharing" tab in the details view is eventually loaded
  257. And I see that resharing the file is not allowed