app-files-sharing-link.feature 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. Feature: app-files-sharing-link
  2. Scenario: open the menu in a public shared link
  3. Given I act as John
  4. And I am logged in
  5. And I share the link for "welcome.txt"
  6. And I write down the shared link
  7. When I act as Jane
  8. And I visit the shared link I wrote down
  9. And I see that the current page is the shared link I wrote down
  10. And I open the Share menu
  11. Then I see that the Share menu is shown
  12. # TODO: disabled unreliable test
  13. # Scenario: hide download in a public shared link
  14. # Given I act as John
  15. # And I am logged in
  16. # And I share the link for "welcome.txt"
  17. # And I set the download of the shared link as hidden
  18. # And I write down the shared link
  19. # When I act as Jane
  20. # And I visit the shared link I wrote down
  21. # And I see that the current page is the shared link I wrote down
  22. # Then I see that the download button is not shown
  23. # And I see that the Share menu button is not shown
  24. # TODO: disabled unreliable test
  25. # Scenario: show download again in a public shared link
  26. # Given I act as John
  27. # And I am logged in
  28. # And I share the link for "welcome.txt"
  29. # And I set the download of the shared link as hidden
  30. # And I set the download of the shared link as shown
  31. # And I write down the shared link
  32. # When I act as Jane
  33. # And I visit the shared link I wrote down
  34. # And I see that the current page is the shared link I wrote down
  35. # Then I see that the download button is shown
  36. # And I open the Share menu
  37. # And I see that the Share menu is shown
  38. Scenario: open a subfolder in a public shared folder
  39. Given I act as John
  40. And I am logged in
  41. And I create a new folder named "Shared folder with subfolders"
  42. And I enter in the folder named "Shared folder with subfolders"
  43. And I create a new folder named "Subfolder"
  44. And I enter in the folder named "Subfolder"
  45. And I create a new folder named "Subsubfolder"
  46. And I see that the file list contains a file named "Subsubfolder"
  47. # The Files app is open again to reload the file list
  48. And I open the Files app
  49. And I share the link for "Shared folder with subfolders"
  50. And I write down the shared link
  51. When I act as Jane
  52. And I visit the shared link I wrote down
  53. And I see that the current page is the shared link I wrote down
  54. Then I see that the file list contains a file named "Subfolder"
  55. And I enter in the folder named "Subfolder"
  56. And I see that the file list contains a file named "Subsubfolder"
  57. Scenario: creation is not possible by default in a public shared folder
  58. Given I act as John
  59. And I am logged in
  60. And I create a new folder named "Shared folder"
  61. # To share the link the "Share" inline action has to be clicked but, as the
  62. # details view is opened automatically when the folder is created, clicking
  63. # on the inline action could fail if it is covered by the details view due
  64. # to its opening animation. Instead of ensuring that the animations of the
  65. # contents and the details view have both finished it is easier to close the
  66. # details view and wait until it is closed before continuing.
  67. And I close the details view
  68. And I see that the details view is closed
  69. And I share the link for "Shared folder"
  70. And I write down the shared link
  71. When I act as Jane
  72. And I visit the shared link I wrote down
  73. And I see that the current page is the shared link I wrote down
  74. And I see that the file list is eventually loaded
  75. Then I see that it is not possible to create new files
  76. Scenario: create folder in a public editable shared folder
  77. Given I act as John
  78. And I am logged in
  79. And I create a new folder named "Editable shared folder"
  80. # To share the link the "Share" inline action has to be clicked but, as the
  81. # details view is opened automatically when the folder is created, clicking
  82. # on the inline action could fail if it is covered by the details view due
  83. # to its opening animation. Instead of ensuring that the animations of the
  84. # contents and the details view have both finished it is easier to close the
  85. # details view and wait until it is closed before continuing.
  86. And I close the details view
  87. And I see that the details view is closed
  88. And I share the link for "Editable shared folder"
  89. And I set the shared link as editable
  90. And I write down the shared link
  91. When I act as Jane
  92. And I visit the shared link I wrote down
  93. And I see that the current page is the shared link I wrote down
  94. And I create a new folder named "Subfolder"
  95. Then I see that the file list contains a file named "Subfolder"
  96. Scenario: owner sees folder created in the public page of an editable shared folder
  97. Given I act as John
  98. And I am logged in
  99. And I create a new folder named "Editable shared folder"
  100. # To share the link the "Share" inline action has to be clicked but, as the
  101. # details view is opened automatically when the folder is created, clicking
  102. # on the inline action could fail if it is covered by the details view due
  103. # to its opening animation. Instead of ensuring that the animations of the
  104. # contents and the details view have both finished it is easier to close the
  105. # details view and wait until it is closed before continuing.
  106. And I close the details view
  107. And I see that the details view is closed
  108. And I share the link for "Editable shared folder"
  109. And I set the shared link as editable
  110. And I write down the shared link
  111. And I act as Jane
  112. And I visit the shared link I wrote down
  113. And I see that the current page is the shared link I wrote down
  114. And I create a new folder named "Subfolder"
  115. And I see that the file list contains a file named "Subfolder"
  116. When I act as John
  117. And I enter in the folder named "Editable shared folder"
  118. Then I see that the file list contains a file named "Subfolder"
  119. Scenario: set a password to a shared link
  120. Given I am logged in
  121. And I share the link for "welcome.txt"
  122. When I protect the shared link with the password "abcdef"
  123. Then I see that the password protect is disabled while loading
  124. And I see that the link share is password protected
  125. # As Talk is not enabled in the acceptance tests of the server the checkbox
  126. # is never shown.
  127. And I see that the checkbox to protect the password of the link share by Talk is not shown
  128. Scenario: access a shared link protected by password with a valid password
  129. Given I act as John
  130. And I am logged in
  131. And I share the link for "welcome.txt" protected by the password "abcdef"
  132. And I write down the shared link
  133. When I act as Jane
  134. And I visit the shared link I wrote down
  135. And I see that the current page is the Authenticate page for the shared link I wrote down
  136. And I authenticate with password "abcdef"
  137. Then I see that the current page is the shared link I wrote down
  138. And I see that the shared file preview shows the text "Welcome to your Nextcloud account!"
  139. Scenario: access a shared link protected by password with an invalid password
  140. Given I act as John
  141. And I am logged in
  142. And I share the link for "welcome.txt" protected by the password "abcdef"
  143. And I write down the shared link
  144. When I act as Jane
  145. And I visit the shared link I wrote down
  146. And I authenticate with password "fedcba"
  147. Then I see that the current page is the Authenticate page for the shared link I wrote down
  148. And I see that a wrong password for the shared file message is shown
  149. Scenario: access a direct download shared link protected by password with a valid password
  150. Given I act as John
  151. And I am logged in
  152. And I share the link for "welcome.txt" protected by the password "abcdef"
  153. And I write down the shared link
  154. When I act as Jane
  155. And I visit the direct download shared link I wrote down
  156. And I see that the current page is the Authenticate page for the direct download shared link I wrote down
  157. And I authenticate with password "abcdef"
  158. # download starts no page redirection
  159. And I see that the current page is the Authenticate page for the direct download shared link I wrote down
  160. Scenario: sharee can not reshare by link if resharing is disabled in the settings after the share is created
  161. Given I act as John
  162. And I am logged in as the admin
  163. And I act as Jane
  164. And I am logged in
  165. And I act as John
  166. And I rename "welcome.txt" to "farewell.txt"
  167. And I see that the file list contains a file named "farewell.txt"
  168. And I share "farewell.txt" with "user0"
  169. And I see that the file is shared with "user0"
  170. And I visit the admin settings page
  171. And I open the "Sharing" section of the "Administration" group
  172. And I disable resharing
  173. And I see that resharing is disabled
  174. When I act as Jane
  175. # The Files app is open again to reload the file list
  176. And I open the Files app
  177. Then I see that the file list contains a file named "farewell.txt"
  178. And I open the details view for "farewell.txt"
  179. And I see that the details view is open
  180. And I open the "Sharing" tab in the details view
  181. And I see that the "Sharing" tab in the details view is eventually loaded
  182. And I see that the file is shared with me by "admin"
  183. And I see that resharing the file by link is not available
  184. Scenario: sharee can unshare a reshare by link if resharing is disabled in the settings after the reshare is created
  185. Given I act as John
  186. And I am logged in as the admin
  187. And I act as Jane
  188. And I am logged in
  189. And I act as John
  190. And I rename "welcome.txt" to "farewell.txt"
  191. And I see that the file list contains a file named "farewell.txt"
  192. And I share "farewell.txt" with "user0"
  193. And I see that the file is shared with "user0"
  194. And I act as Jane
  195. # The Files app is open again to reload the file list
  196. And I open the Files app
  197. And I share the link for "farewell.txt"
  198. And I write down the shared link
  199. And I act as John
  200. And I visit the admin settings page
  201. And I open the "Sharing" section of the "Administration" group
  202. And I disable resharing
  203. And I see that resharing is disabled
  204. When I act as Jane
  205. # The Files app is open again to reload the file list
  206. And I open the Files app
  207. And I open the details view for "farewell.txt"
  208. And I see that the details view is open
  209. And I open the "Sharing" tab in the details view
  210. And I see that the "Sharing" tab in the details view is eventually loaded
  211. And I unshare the link share
  212. Then I see that resharing the file by link is not available
  213. Scenario: reshare by link can be accessed if resharing is disabled in the settings after the reshare is created
  214. Given I act as John
  215. And I am logged in as the admin
  216. And I act as Jane
  217. And I am logged in
  218. And I act as John
  219. And I rename "welcome.txt" to "farewell.txt"
  220. And I see that the file list contains a file named "farewell.txt"
  221. And I share "farewell.txt" with "user0"
  222. And I see that the file is shared with "user0"
  223. And I act as Jane
  224. # The Files app is open again to reload the file list
  225. And I open the Files app
  226. And I share the link for "farewell.txt"
  227. And I write down the shared link
  228. And I act as John
  229. And I visit the admin settings page
  230. And I open the "Sharing" section of the "Administration" group
  231. And I disable resharing
  232. And I see that resharing is disabled
  233. When I act as Jim
  234. And I visit the shared link I wrote down
  235. Then I see that the current page is the shared link I wrote down
  236. And I see that the shared file preview shows the text "Welcome to your Nextcloud account!"