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 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  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 that needs to accept shares
  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 visit the settings page
  27. And I open the "Sharing" section
  28. And I disable accepting the shares by default
  29. And I see that shares are not accepted by default
  30. And I act as John
  31. And I rename "welcome.txt" to "farewell.txt"
  32. And I see that the file list contains a file named "farewell.txt"
  33. When I share "farewell.txt" with "user0"
  34. And I see that the file is shared with "user0"
  35. And I act as Jane
  36. And I open the Files app
  37. And I see that the file list does not contain a file named "farewell.txt"
  38. And I accept the share for "/farewell.txt" in the notifications
  39. # The Files app is open again to reload the file list
  40. And I open the Files app
  41. Then I see that the file list contains a file named "farewell.txt"
  42. And I open the details view for "farewell.txt"
  43. And I see that the details view is open
  44. And I open the "Sharing" tab in the details view
  45. And I see that the "Sharing" tab in the details view is eventually loaded
  46. And I see that the file is shared with me by "admin"
  47. Scenario: share a file with another user who already has a file with that name
  48. Given I act as John
  49. And I am logged in as the admin
  50. And I act as Jane
  51. And I am logged in
  52. And I act as John
  53. When I share "welcome.txt" with "user0"
  54. And I see that the file is shared with "user0"
  55. And I act as Jane
  56. # The Files app is open again to reload the file list
  57. And I open the Files app
  58. Then I see that the file list contains a file named "welcome (2).txt"
  59. And I open the details view for "welcome (2).txt"
  60. And I see that the details view is open
  61. And I open the "Sharing" tab in the details view
  62. And I see that the "Sharing" tab in the details view is eventually loaded
  63. And I see that the file is shared with me by "admin"
  64. Scenario: share a skeleton file with another user before first login
  65. # If a file is shared with a user before her first login the skeleton would
  66. # not have been created, so if the shared file has the same name as one from
  67. # the skeleton the shared file will take its place and the skeleton file
  68. # will not be added.
  69. Given I act as John
  70. And I am logged in as the admin
  71. When I share "welcome.txt" with "user0"
  72. And I see that the file is shared with "user0"
  73. And I act as Jane
  74. And I am logged in
  75. Then I see that the file list contains a file named "welcome.txt"
  76. And I open the details view for "welcome.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 "admin"
  81. Scenario: reshare a file with another user
  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 Jim
  87. And I am logged in as "user1"
  88. And I act as John
  89. And I rename "welcome.txt" to "farewell.txt"
  90. And I see that the file list contains a file named "farewell.txt"
  91. And I share "farewell.txt" with "user0"
  92. And I see that the file is shared with "user0"
  93. And I act as Jane
  94. # The Files app is open again to reload the file list
  95. And I open the Files app
  96. When I share "farewell.txt" with "user1"
  97. And I see that the file is shared with "user1"
  98. And I act as Jim
  99. # The Files app is open again to reload the file list
  100. And I open the Files app
  101. Then I see that the file list contains a file named "farewell.txt"
  102. And I open the details view for "farewell.txt"
  103. And I see that the details view is open
  104. And I open the "Sharing" tab in the details view
  105. And I see that the "Sharing" tab in the details view is eventually loaded
  106. And I see that the file is shared with me by "user0"
  107. Scenario: owner sees reshares with other users
  108. Given I act as John
  109. And I am logged in as the admin
  110. And I act as Jane
  111. And I am logged in
  112. And I act as John
  113. And I rename "welcome.txt" to "farewell.txt"
  114. And I see that the file list contains a file named "farewell.txt"
  115. And I share "farewell.txt" with "user0"
  116. And I see that the file is shared with "user0"
  117. And I act as Jane
  118. # The Files app is open again to reload the file list
  119. And I open the Files app
  120. And I share "farewell.txt" with "user1"
  121. And I see that the file is shared with "user1"
  122. When I act as John
  123. # The Files app is open again to reload the file list and the shares
  124. And I open the Files app
  125. And I open the details view for "farewell.txt"
  126. And I see that the details view is open
  127. And I open the "Sharing" tab in the details view
  128. And I see that the "Sharing" tab in the details view is eventually loaded
  129. Then I see that the file is shared with "user0"
  130. And I see that the file is shared with "user1"
  131. Scenario: share an empty folder with another user
  132. Given I act as John
  133. And I am logged in as the admin
  134. And I act as Jane
  135. And I am logged in
  136. And I act as John
  137. And I create a new folder named "Shared folder"
  138. And I see that the file list contains a file named "Shared folder"
  139. When I share "Shared folder" with "user0"
  140. And I see that the file is shared with "user0"
  141. And I act as Jane
  142. # The Files app is open again to reload the file list
  143. And I open the Files app
  144. Then I see that the file list contains a file named "Shared folder"
  145. And I open the details view for "Shared folder"
  146. And I see that the details view is open
  147. And I open the "Sharing" tab in the details view
  148. And I see that the "Sharing" tab in the details view is eventually loaded
  149. And I see that the file is shared with me by "admin"
  150. Scenario: sharee sees a folder created by the owner in a shared folder
  151. Given I act as John
  152. And I am logged in as the admin
  153. And I act as Jane
  154. And I am logged in
  155. And I act as John
  156. And I create a new folder named "Shared folder"
  157. And I see that the file list contains a file named "Shared folder"
  158. And I share "Shared folder" with "user0"
  159. And I see that the file is shared with "user0"
  160. And I enter in the folder named "Shared folder"
  161. And I create a new folder named "Subfolder"
  162. And I see that the file list contains a file named "Subfolder"
  163. When I act as Jane
  164. # The Files app is open again to reload the file list
  165. And I open the Files app
  166. And I enter in the folder named "Shared folder"
  167. Then I see that the file list contains a file named "Subfolder"
  168. Scenario: owner sees a folder created by the sharee in a shared folder
  169. Given I act as John
  170. And I am logged in as the admin
  171. And I act as Jane
  172. And I am logged in
  173. And I act as John
  174. And I create a new folder named "Shared folder"
  175. And I see that the file list contains a file named "Shared folder"
  176. And I share "Shared folder" with "user0"
  177. And I see that the file is shared with "user0"
  178. And I act as Jane
  179. # The Files app is open again to reload the file list
  180. And I open the Files app
  181. And I enter in the folder named "Shared folder"
  182. And I create a new folder named "Subfolder"
  183. And I see that the file list contains a file named "Subfolder"
  184. When I act as John
  185. And I enter in the folder named "Shared folder"
  186. Then I see that the file list contains a file named "Subfolder"
  187. Scenario: resharee sees a folder created by the owner in a shared folder
  188. Given I act as John
  189. And I am logged in as the admin
  190. And I act as Jane
  191. And I am logged in
  192. And I act as Jim
  193. And I am logged in as "user1"
  194. And I act as John
  195. And I create a new folder named "Shared folder"
  196. And I see that the file list contains a file named "Shared folder"
  197. And I share "Shared folder" with "user0"
  198. And I see that the file is shared with "user0"
  199. And I act as Jane
  200. # The Files app is open again to reload the file list
  201. And I open the Files app
  202. And I share "Shared folder" with "user1"
  203. And I act as John
  204. And I enter in the folder named "Shared folder"
  205. And I create a new folder named "Subfolder"
  206. And I see that the file list contains a file named "Subfolder"
  207. When I act as Jim
  208. # The Files app is open again to reload the file list
  209. And I open the Files app
  210. And I enter in the folder named "Shared folder"
  211. Then I see that the file list contains a file named "Subfolder"
  212. Scenario: owner sees a folder created by the resharee in a shared folder
  213. Given I act as John
  214. And I am logged in as the admin
  215. And I act as Jane
  216. And I am logged in
  217. And I act as Jim
  218. And I am logged in as "user1"
  219. And I act as John
  220. And I create a new folder named "Shared folder"
  221. And I see that the file list contains a file named "Shared folder"
  222. And I share "Shared folder" with "user0"
  223. And I see that the file is shared with "user0"
  224. And I act as Jane
  225. # The Files app is open again to reload the file list
  226. And I open the Files app
  227. And I share "Shared folder" with "user1"
  228. And I act as Jim
  229. # The Files app is open again to reload the file list
  230. And I open the Files app
  231. And I enter in the folder named "Shared folder"
  232. And I create a new folder named "Subfolder"
  233. And I see that the file list contains a file named "Subfolder"
  234. When I act as John
  235. And I enter in the folder named "Shared folder"
  236. Then I see that the file list contains a file named "Subfolder"
  237. Scenario: sharee can not reshare a folder if the sharer disables it
  238. Given I act as John
  239. And I am logged in as the admin
  240. And I act as Jane
  241. And I am logged in
  242. And I act as John
  243. And I create a new folder named "Shared folder"
  244. And I see that the file list contains a file named "Shared folder"
  245. And I share "Shared folder" with "user0"
  246. And I see that the file is shared with "user0"
  247. And I set the share with "user0" as not reshareable
  248. And I see that "user0" can not reshare the share
  249. When I act as Jane
  250. # The Files app is open again to reload the file list
  251. And I open the Files app
  252. Then I see that the file list contains a file named "Shared folder"
  253. And I open the details view for "Shared folder"
  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 the file is shared with me by "admin"
  258. And I see that resharing the file is not allowed
  259. Scenario: sharee can not reshare a subfolder if the sharer disables it for the parent folder
  260. Given I act as John
  261. And I am logged in as the admin
  262. And I act as Jane
  263. And I am logged in
  264. And I act as John
  265. And I create a new folder named "Shared folder"
  266. And I see that the file list contains a file named "Shared folder"
  267. And I share "Shared folder" with "user0"
  268. And I see that the file is shared with "user0"
  269. And I set the share with "user0" as not reshareable
  270. And I see that "user0" can not reshare the share
  271. And I enter in the folder named "Shared folder"
  272. And I create a new folder named "Subfolder"
  273. And I see that the file list contains a file named "Subfolder"
  274. When I act as Jane
  275. # The Files app is open again to reload the file list
  276. And I open the Files app
  277. And I enter in the folder named "Shared folder"
  278. Then I see that the file list contains a file named "Subfolder"
  279. And I open the details view for "Subfolder"
  280. And I see that the details view is open
  281. And I open the "Sharing" tab in the details view
  282. And I see that the "Sharing" tab in the details view is eventually loaded
  283. And I see that resharing the file is not allowed