1
0

app-files-sharing.feature 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  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. #
  48. # Scenario: share a file with another user who already has a file with that name
  49. # Given I act as John
  50. # And I am logged in as the admin
  51. # And I act as Jane
  52. # And I am logged in
  53. # And I act as John
  54. # When I share "welcome.txt" with "user0"
  55. # And I see that the file is shared with "user0"
  56. # And I act as Jane
  57. # # The Files app is open again to reload the file list
  58. # And I open the Files app
  59. # Then I see that the file list contains a file named "welcome (2).txt"
  60. # And I open the details view for "welcome (2).txt"
  61. # And I see that the details view is open
  62. # And I open the "Sharing" tab in the details view
  63. # And I see that the "Sharing" tab in the details view is eventually loaded
  64. # And I see that the file is shared with me by "admin"
  65. #
  66. # Scenario: share a skeleton file with another user before first login
  67. # # If a file is shared with a user before her first login the skeleton would
  68. # # not have been created, so if the shared file has the same name as one from
  69. # # the skeleton the shared file will take its place and the skeleton file
  70. # # will not be added.
  71. # Given I act as John
  72. # And I am logged in as the admin
  73. # When I share "welcome.txt" with "user0"
  74. # And I see that the file is shared with "user0"
  75. # And I act as Jane
  76. # And I am logged in
  77. # Then I see that the file list contains a file named "welcome.txt"
  78. # And I open the details view for "welcome.txt"
  79. # And I see that the details view is open
  80. # And I open the "Sharing" tab in the details view
  81. # And I see that the "Sharing" tab in the details view is eventually loaded
  82. # And I see that the file is shared with me by "admin"
  83. #
  84. # Scenario: reshare a file with another user
  85. # Given I act as John
  86. # And I am logged in as the admin
  87. # And I act as Jane
  88. # And I am logged in
  89. # And I act as Jim
  90. # And I am logged in as "user1"
  91. # And I act as John
  92. # And I rename "welcome.txt" to "farewell.txt"
  93. # And I see that the file list contains a file named "farewell.txt"
  94. # And I share "farewell.txt" with "user0"
  95. # And I see that the file is shared with "user0"
  96. # And I act as Jane
  97. # # The Files app is open again to reload the file list
  98. # And I open the Files app
  99. # When I share "farewell.txt" with "user1"
  100. # And I see that the file is shared with "user1"
  101. # And I act as Jim
  102. # # The Files app is open again to reload the file list
  103. # And I open the Files app
  104. # Then I see that the file list contains a file named "farewell.txt"
  105. # And I open the details view for "farewell.txt"
  106. # And I see that the details view is open
  107. # And I open the "Sharing" tab in the details view
  108. # And I see that the "Sharing" tab in the details view is eventually loaded
  109. # And I see that the file is shared with me by "user0"
  110. #
  111. # Scenario: owner sees reshares with other users
  112. # Given I act as John
  113. # And I am logged in as the admin
  114. # And I act as Jane
  115. # And I am logged in
  116. # And I act as John
  117. # And I rename "welcome.txt" to "farewell.txt"
  118. # And I see that the file list contains a file named "farewell.txt"
  119. # And I share "farewell.txt" with "user0"
  120. # And I see that the file is shared with "user0"
  121. # And I act as Jane
  122. # # The Files app is open again to reload the file list
  123. # And I open the Files app
  124. # And I share "farewell.txt" with "user1"
  125. # And I see that the file is shared with "user1"
  126. # When I act as John
  127. # # The Files app is open again to reload the file list and the shares
  128. # And I open the Files app
  129. # And I open the details view for "farewell.txt"
  130. # And I see that the details view is open
  131. # And I open the "Sharing" tab in the details view
  132. # And I see that the "Sharing" tab in the details view is eventually loaded
  133. # Then I see that the file is shared with "user0"
  134. # And I see that the file is shared with "user1"
  135. #
  136. # Scenario: share an empty folder with another user
  137. # Given I act as John
  138. # And I am logged in as the admin
  139. # And I act as Jane
  140. # And I am logged in
  141. # And I act as John
  142. # And I create a new folder named "Shared folder"
  143. # And I see that the file list contains a file named "Shared folder"
  144. # When I share "Shared folder" with "user0"
  145. # And I see that the file is shared with "user0"
  146. # And I act as Jane
  147. # # The Files app is open again to reload the file list
  148. # And I open the Files app
  149. # Then I see that the file list contains a file named "Shared folder"
  150. # And I open the details view for "Shared folder"
  151. # And I see that the details view is open
  152. # And I open the "Sharing" tab in the details view
  153. # And I see that the "Sharing" tab in the details view is eventually loaded
  154. # And I see that the file is shared with me by "admin"
  155. #
  156. # Scenario: sharee sees a folder created by the owner in a shared folder
  157. # Given I act as John
  158. # And I am logged in as the admin
  159. # And I act as Jane
  160. # And I am logged in
  161. # And I act as John
  162. # And I create a new folder named "Shared folder"
  163. # And I see that the file list contains a file named "Shared folder"
  164. # And I share "Shared folder" with "user0"
  165. # And I see that the file is shared with "user0"
  166. # And I enter in the folder named "Shared folder"
  167. # And I create a new folder named "Subfolder"
  168. # And I see that the file list contains a file named "Subfolder"
  169. # When I act as Jane
  170. # # The Files app is open again to reload the file list
  171. # And I open the Files app
  172. # And I enter in the folder named "Shared folder"
  173. # Then I see that the file list contains a file named "Subfolder"
  174. #
  175. # Scenario: owner sees a folder created by the sharee in a shared folder
  176. # Given I act as John
  177. # And I am logged in as the admin
  178. # And I act as Jane
  179. # And I am logged in
  180. # And I act as John
  181. # And I create a new folder named "Shared folder"
  182. # And I see that the file list contains a file named "Shared folder"
  183. # And I share "Shared folder" with "user0"
  184. # And I see that the file is shared with "user0"
  185. # And I act as Jane
  186. # # The Files app is open again to reload the file list
  187. # And I open the Files app
  188. # And I enter in the folder named "Shared folder"
  189. # And I create a new folder named "Subfolder"
  190. # And I see that the file list contains a file named "Subfolder"
  191. # When I act as John
  192. # And I enter in the folder named "Shared folder"
  193. # Then I see that the file list contains a file named "Subfolder"
  194. #
  195. # Scenario: resharee sees a folder created by the owner in a shared folder
  196. # Given I act as John
  197. # And I am logged in as the admin
  198. # And I act as Jane
  199. # And I am logged in
  200. # And I act as Jim
  201. # And I am logged in as "user1"
  202. # And I act as John
  203. # And I create a new folder named "Shared folder"
  204. # And I see that the file list contains a file named "Shared folder"
  205. # And I share "Shared folder" with "user0"
  206. # And I see that the file is shared with "user0"
  207. # And I act as Jane
  208. # # The Files app is open again to reload the file list
  209. # And I open the Files app
  210. # And I share "Shared folder" with "user1"
  211. # And I act as John
  212. # And I enter in the folder named "Shared folder"
  213. # And I create a new folder named "Subfolder"
  214. # And I see that the file list contains a file named "Subfolder"
  215. # When I act as Jim
  216. # # The Files app is open again to reload the file list
  217. # And I open the Files app
  218. # And I enter in the folder named "Shared folder"
  219. # Then I see that the file list contains a file named "Subfolder"
  220. #
  221. # Scenario: owner sees a folder created by the resharee in a shared folder
  222. # Given I act as John
  223. # And I am logged in as the admin
  224. # And I act as Jane
  225. # And I am logged in
  226. # And I act as Jim
  227. # And I am logged in as "user1"
  228. # And I act as John
  229. # And I create a new folder named "Shared folder"
  230. # And I see that the file list contains a file named "Shared folder"
  231. # And I share "Shared folder" with "user0"
  232. # And I see that the file is shared with "user0"
  233. # And I act as Jane
  234. # # The Files app is open again to reload the file list
  235. # And I open the Files app
  236. # And I share "Shared folder" with "user1"
  237. # And I act as Jim
  238. # # The Files app is open again to reload the file list
  239. # And I open the Files app
  240. # And I enter in the folder named "Shared folder"
  241. # And I create a new folder named "Subfolder"
  242. # And I see that the file list contains a file named "Subfolder"
  243. # When I act as John
  244. # And I enter in the folder named "Shared folder"
  245. # Then I see that the file list contains a file named "Subfolder"
  246. #
  247. # Scenario: sharer does not see resharing option for a folder if resharing is disabled in the settings after the share is created
  248. # Given I am logged in as the admin
  249. # And I create a new folder named "Shared folder"
  250. # And I see that the file list contains a file named "Shared folder"
  251. # And I share "Shared folder" with "user0"
  252. # And I see that the file is shared with "user0"
  253. # When I visit the admin settings page
  254. # And I open the "Sharing" section of the "Administration" group
  255. # And I disable resharing
  256. # And I see that resharing is disabled
  257. # Then I open the Files app
  258. # And I open the details view for "Shared folder"
  259. # And I see that the details view is open
  260. # And I open the "Sharing" tab in the details view
  261. # And I see that the "Sharing" tab in the details view is eventually loaded
  262. # And I see that resharing for "user0" is not available
  263. #
  264. # Scenario: sharee can not reshare a folder if resharing is disabled in the settings after the share is created
  265. # Given I act as John
  266. # And I am logged in as the admin
  267. # And I act as Jane
  268. # And I am logged in
  269. # And I act as John
  270. # And I create a new folder named "Shared folder"
  271. # And I see that the file list contains a file named "Shared folder"
  272. # And I share "Shared folder" with "user0"
  273. # And I see that the file is shared with "user0"
  274. # And I visit the admin settings page
  275. # And I open the "Sharing" section of the "Administration" group
  276. # And I disable resharing
  277. # And I see that resharing is disabled
  278. # When I act as Jane
  279. # # The Files app is open again to reload the file list
  280. # And I open the Files app
  281. # Then I see that the file list contains a file named "Shared folder"
  282. # And I open the details view for "Shared folder"
  283. # And I see that the details view is open
  284. # And I open the "Sharing" tab in the details view
  285. # And I see that the "Sharing" tab in the details view is eventually loaded
  286. # And I see that the file is shared with me by "admin"
  287. # And I see that resharing the file is not allowed
  288. #
  289. # Scenario: sharee can unshare a folder if resharing is disabled in the settings after the share is created
  290. # Given I act as John
  291. # And I am logged in as the admin
  292. # And I act as Jane
  293. # And I am logged in
  294. # And I act as John
  295. # And I create a new folder named "Shared folder"
  296. # And I see that the file list contains a file named "Shared folder"
  297. # And I share "Shared folder" with "user0"
  298. # And I see that the file is shared with "user0"
  299. # And I act as Jane
  300. # # The Files app is open again to reload the file list
  301. # And I open the Files app
  302. # And I share "Shared folder" with "user1"
  303. # And I act as John
  304. # And I visit the admin settings page
  305. # And I open the "Sharing" section of the "Administration" group
  306. # And I disable resharing
  307. # And I see that resharing is disabled
  308. # When I act as Jane
  309. # # The Files app is open again to reload the file list
  310. # And I open the Files app
  311. # Then I see that the file list contains a file named "Shared folder"
  312. # And I open the details view for "Shared folder"
  313. # And I see that the details view is open
  314. # And I open the "Sharing" tab in the details view
  315. # And I see that the "Sharing" tab in the details view is eventually loaded
  316. # And I see that the file is shared with me by "admin"
  317. # And I unshare the share with "user1"
  318. # And I see that the file is not shared with "user1"
  319. #
  320. # Scenario: resharee sees a folder created by the owner in a shared folder if resharing is disabled in the settings after the share is created
  321. # Given I act as John
  322. # And I am logged in as the admin
  323. # And I act as Jane
  324. # And I am logged in
  325. # And I act as Jim
  326. # And I am logged in as "user1"
  327. # And I act as John
  328. # And I create a new folder named "Shared folder"
  329. # And I see that the file list contains a file named "Shared folder"
  330. # And I share "Shared folder" with "user0"
  331. # And I see that the file is shared with "user0"
  332. # And I act as Jane
  333. # # The Files app is open again to reload the file list
  334. # And I open the Files app
  335. # And I share "Shared folder" with "user1"
  336. # And I act as John
  337. # And I visit the admin settings page
  338. # And I open the "Sharing" section of the "Administration" group
  339. # And I disable resharing
  340. # And I see that resharing is disabled
  341. # And I open the Files app
  342. # And I enter in the folder named "Shared folder"
  343. # And I create a new folder named "Subfolder"
  344. # And I see that the file list contains a file named "Subfolder"
  345. # When I act as Jim
  346. # # The Files app is open again to reload the file list
  347. # And I open the Files app
  348. # And I enter in the folder named "Shared folder"
  349. # Then I see that the file list contains a file named "Subfolder"
  350. #
  351. # Scenario: sharee can not reshare a folder if the sharer disables it
  352. # Given I act as John
  353. # And I am logged in as the admin
  354. # And I act as Jane
  355. # And I am logged in
  356. # And I act as John
  357. # And I create a new folder named "Shared folder"
  358. # And I see that the file list contains a file named "Shared folder"
  359. # And I share "Shared folder" with "user0"
  360. # And I see that the file is shared with "user0"
  361. # And I set the share with "user0" as not reshareable
  362. # And I see that "user0" can not reshare the share
  363. # When I act as Jane
  364. # # The Files app is open again to reload the file list
  365. # And I open the Files app
  366. # Then I see that the file list contains a file named "Shared folder"
  367. # And I open the details view for "Shared folder"
  368. # And I see that the details view is open
  369. # And I open the "Sharing" tab in the details view
  370. # And I see that the "Sharing" tab in the details view is eventually loaded
  371. # And I see that the file is shared with me by "admin"
  372. # And I see that resharing the file is not allowed
  373. #
  374. # Scenario: sharee can not reshare a subfolder if the sharer disables it for the parent folder
  375. # Given I act as John
  376. # And I am logged in as the admin
  377. # And I act as Jane
  378. # And I am logged in
  379. # And I act as John
  380. # And I create a new folder named "Shared folder"
  381. # And I see that the file list contains a file named "Shared folder"
  382. # And I share "Shared folder" with "user0"
  383. # And I see that the file is shared with "user0"
  384. # And I set the share with "user0" as not reshareable
  385. # And I see that "user0" can not reshare the share
  386. # And I enter in the folder named "Shared folder"
  387. # And I create a new folder named "Subfolder"
  388. # And I see that the file list contains a file named "Subfolder"
  389. # When I act as Jane
  390. # # The Files app is open again to reload the file list
  391. # And I open the Files app
  392. # And I enter in the folder named "Shared folder"
  393. # Then I see that the file list contains a file named "Subfolder"
  394. # And I open the details view for "Subfolder"
  395. # And I see that the details view is open
  396. # And I open the "Sharing" tab in the details view
  397. # And I see that the "Sharing" tab in the details view is eventually loaded
  398. # And I see that resharing the file is not allowed
  399. #
  400. # Scenario: sharee can not reshare a file with edit permission if the sharer disables it
  401. # Given I act as John
  402. # And I am logged in as the admin
  403. # And I act as Jane
  404. # And I am logged in
  405. # And I act as John
  406. # And I rename "welcome.txt" to "farewell.txt"
  407. # And I see that the file list contains a file named "farewell.txt"
  408. # And I share "farewell.txt" with "user0"
  409. # And I see that the file is shared with "user0"
  410. # And I set the share with "user0" as not editable
  411. # And I see that "user0" can not edit the share
  412. # When I act as Jane
  413. # # The Files app is open again to reload the file list
  414. # And I open the Files app
  415. # And I share "farewell.txt" with "user1"
  416. # Then I see that the file is shared with "user1"
  417. # And I see that "user1" can not edit the share
  418. # And I see that "user1" can not be allowed to edit the share
  419. # TODO: disabled unreliable test
  420. # Scenario: sharee can not reshare a folder with create permission if the sharer disables it
  421. # Given I act as John
  422. # And I am logged in as the admin
  423. # And I act as Jane
  424. # And I am logged in
  425. # And I act as John
  426. # And I create a new folder named "Shared folder"
  427. # And I see that the file list contains a file named "Shared folder"
  428. # And I share "Shared folder" with "user0"
  429. # And I see that the file is shared with "user0"
  430. # And I set the share with "user0" as not creatable
  431. # And I see that "user0" can not create in the share
  432. # When I act as Jane
  433. # # The Files app is open again to reload the file list
  434. # And I open the Files app
  435. # And I share "Shared folder" with "user1"
  436. # Then I see that the file is shared with "user1"
  437. # And I see that "user1" can not create in the share
  438. # And I see that "user1" can not be allowed to create in the share
  439. # TODO: disabled unreliable test
  440. # Scenario: sharee can revoke create permission from reshare after the sharer disabled it
  441. # Given I act as John
  442. # And I am logged in as the admin
  443. # And I act as Jane
  444. # And I am logged in
  445. # And I act as Jim
  446. # And I am logged in as "user1"
  447. # And I act as John
  448. # And I create a new folder named "Shared folder"
  449. # And I see that the file list contains a file named "Shared folder"
  450. # And I share "Shared folder" with "user0"
  451. # And I see that the file is shared with "user0"
  452. # And I act as Jane
  453. # # The Files app is open again to reload the file list
  454. # And I open the Files app
  455. # And I share "Shared folder" with "user1"
  456. # And I see that the file is shared with "user1"
  457. # And I act as John
  458. # And I set the share with "user0" as not creatable
  459. # And I see that "user0" can not create in the share
  460. # And I act as Jim
  461. # # The Files app is open again to reload the file list
  462. # And I open the Files app
  463. # And I enter in the folder named "Shared folder"
  464. # # Creation is still allowed in already created reshares
  465. # And I create a new folder named "Subfolder"
  466. # And I see that the file list contains a file named "Subfolder"
  467. # When I act as Jane
  468. # # The Files app is open again to reload the file list
  469. # And I open the Files app
  470. # And I open the details view for "Shared folder"
  471. # And I see that the details view is open
  472. # And I open the "Sharing" tab in the details view
  473. # And I see that the "Sharing" tab in the details view is eventually loaded
  474. # And I set the share with "user1" as not creatable
  475. # Then I see that "user1" can not create in the share
  476. # And I see that "user1" can not be allowed to create in the share
  477. # And I act as Jim
  478. # # The Files app is open again to reload the file list
  479. # And I open the Files app
  480. # And I enter in the folder named "Shared folder"
  481. # And I see that it is not possible to create new files