app-files.feature 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. Feature: app-files
  2. Scenario: viewing a favorite file in its folder closes the details view
  3. Given I am logged in
  4. And I mark "welcome.txt" as favorite
  5. And I see that "welcome.txt" is marked as favorite
  6. And I open the "Favorites" section
  7. And I open the details view for "welcome.txt"
  8. And I see that the details view for "Favorites" section is open
  9. When I view "welcome.txt" in folder
  10. Then I see that the current section is "All files"
  11. And I see that the details view is closed
  12. Scenario: viewing a favorite file in its folder does not prevent opening the details view in "All files" section
  13. Given I am logged in
  14. And I mark "welcome.txt" as favorite
  15. And I see that "welcome.txt" is marked as favorite
  16. And I open the "Favorites" section
  17. And I open the details view for "welcome.txt"
  18. And I see that the details view for "Favorites" section is open
  19. And I view "welcome.txt" in folder
  20. And I see that the current section is "All files"
  21. When I open the details view for "welcome.txt"
  22. Then I see that the details view for "All files" section is open
  23. Scenario: show recent files
  24. Given I am logged in
  25. And I create a new folder named "Folder just created"
  26. When I open the "Recent" section
  27. Then I see that the current section is "Recent"
  28. Then I see that the file list contains a file named "Folder just created"
  29. Scenario: show recent files for a second time
  30. Given I am logged in
  31. And I open the "Recent" section
  32. And I see that the current section is "Recent"
  33. And I open the "All files" section
  34. And I see that the current section is "All files"
  35. And I create a new folder named "Folder just created"
  36. When I open the "Recent" section
  37. Then I see that the current section is "Recent"
  38. Then I see that the file list contains a file named "Folder just created"
  39. Scenario: show favorites
  40. Given I am logged in
  41. And I mark "welcome.txt" as favorite
  42. When I open the "Favorites" section
  43. Then I see that the current section is "Favorites"
  44. Then I see that the file list contains a file named "welcome.txt"
  45. Scenario: show favorites for a second time
  46. Given I am logged in
  47. And I open the "Favorites" section
  48. And I see that the current section is "Favorites"
  49. And I open the "All files" section
  50. And I see that the current section is "All files"
  51. And I mark "welcome.txt" as favorite
  52. When I open the "Favorites" section
  53. Then I see that the current section is "Favorites"
  54. Then I see that the file list contains a file named "welcome.txt"
  55. Scenario: show shares
  56. Given I am logged in
  57. And I share the link for "welcome.txt"
  58. When I open the "Shared by link" section
  59. Then I see that the current section is "Shared by link"
  60. Then I see that the file list contains a file named "welcome.txt"
  61. Scenario: show shares for a second time
  62. Given I am logged in
  63. And I open the "Shared by link" section
  64. And I see that the current section is "Shared by link"
  65. And I open the "All files" section
  66. And I see that the current section is "All files"
  67. And I share the link for "welcome.txt"
  68. When I open the "Shared by link" section
  69. Then I see that the current section is "Shared by link"
  70. Then I see that the file list contains a file named "welcome.txt"
  71. Scenario: show deleted files
  72. Given I am logged in
  73. And I delete "welcome.txt"
  74. When I open the "Deleted files" section
  75. Then I see that the current section is "Deleted files"
  76. Then I see that the file list contains a file named "welcome.txt"
  77. Scenario: show deleted files for a second time
  78. Given I am logged in
  79. And I open the "Deleted files" section
  80. And I see that the current section is "Deleted files"
  81. And I open the "All files" section
  82. And I see that the current section is "All files"
  83. And I delete "welcome.txt"
  84. When I open the "Deleted files" section
  85. Then I see that the current section is "Deleted files"
  86. Then I see that the file list contains a file named "welcome.txt"
  87. Scenario: rename a file with the details view open
  88. Given I am logged in
  89. And I open the details view for "welcome.txt"
  90. When I rename "welcome.txt" to "farewell.txt"
  91. Then I see that the file list contains a file named "farewell.txt"
  92. And I see that the file name shown in the details view is "farewell.txt"
  93. Scenario: open the menu in a public shared link
  94. Given I act as John
  95. And I am logged in
  96. And I share the link for "welcome.txt"
  97. And I write down the shared link
  98. When I act as Jane
  99. And I visit the shared link I wrote down
  100. And I see that the current page is the shared link I wrote down
  101. And I open the Share menu
  102. Then I see that the Share menu is shown
  103. Scenario: creation is not possible by default in a public shared folder
  104. Given I act as John
  105. And I am logged in
  106. And I create a new folder named "Shared folder"
  107. # To share the link the "Share" inline action has to be clicked but, as the
  108. # details view is opened automatically when the folder is created, clicking
  109. # on the inline action could fail if it is covered by the details view due
  110. # to its opening animation. Instead of ensuring that the animations of the
  111. # contents and the details view have both finished it is easier to close the
  112. # details view and wait until it is closed before continuing.
  113. And I close the details view
  114. And I see that the details view is closed
  115. And I share the link for "Shared folder"
  116. And I write down the shared link
  117. When I act as Jane
  118. And I visit the shared link I wrote down
  119. And I see that the current page is the shared link I wrote down
  120. And I see that the file list is eventually loaded
  121. Then I see that it is not possible to create new files
  122. Scenario: create folder in a public editable shared folder
  123. Given I act as John
  124. And I am logged in
  125. And I create a new folder named "Editable shared folder"
  126. # To share the link the "Share" inline action has to be clicked but, as the
  127. # details view is opened automatically when the folder is created, clicking
  128. # on the inline action could fail if it is covered by the details view due
  129. # to its opening animation. Instead of ensuring that the animations of the
  130. # contents and the details view have both finished it is easier to close the
  131. # details view and wait until it is closed before continuing.
  132. And I close the details view
  133. And I see that the details view is closed
  134. And I share the link for "Editable shared folder"
  135. And I set the shared link as editable
  136. And I write down the shared link
  137. When I act as Jane
  138. And I visit the shared link I wrote down
  139. And I see that the current page is the shared link I wrote down
  140. And I create a new folder named "Subfolder"
  141. Then I see that the file list contains a file named "Subfolder"
  142. Scenario: owner sees folder created in the public page of an editable shared folder
  143. Given I act as John
  144. And I am logged in
  145. And I create a new folder named "Editable shared folder"
  146. # To share the link the "Share" inline action has to be clicked but, as the
  147. # details view is opened automatically when the folder is created, clicking
  148. # on the inline action could fail if it is covered by the details view due
  149. # to its opening animation. Instead of ensuring that the animations of the
  150. # contents and the details view have both finished it is easier to close the
  151. # details view and wait until it is closed before continuing.
  152. And I close the details view
  153. And I see that the details view is closed
  154. And I share the link for "Editable shared folder"
  155. And I set the shared link as editable
  156. And I write down the shared link
  157. And I act as Jane
  158. And I visit the shared link I wrote down
  159. And I see that the current page is the shared link I wrote down
  160. And I create a new folder named "Subfolder"
  161. And I see that the file list contains a file named "Subfolder"
  162. When I act as John
  163. And I enter in the folder named "Editable shared folder"
  164. Then I see that the file list contains a file named "Subfolder"
  165. Scenario: set a password to a shared link
  166. Given I am logged in
  167. And I share the link for "welcome.txt"
  168. When I protect the shared link with the password "abcdef"
  169. Then I see that the working icon for password protect is shown
  170. And I see that the working icon for password protect is eventually not shown
  171. Scenario: access a shared link protected by password with a valid password
  172. Given I act as John
  173. And I am logged in
  174. And I share the link for "welcome.txt" protected by the password "abcdef"
  175. And I write down the shared link
  176. When I act as Jane
  177. And I visit the shared link I wrote down
  178. And I see that the current page is the Authenticate page for the shared link I wrote down
  179. And I authenticate with password "abcdef"
  180. Then I see that the current page is the shared link I wrote down
  181. And I see that the shared file preview shows the text "Welcome to your Nextcloud account!"
  182. Scenario: access a shared link protected by password with an invalid password
  183. Given I act as John
  184. And I am logged in
  185. And I share the link for "welcome.txt" protected by the password "abcdef"
  186. And I write down the shared link
  187. When I act as Jane
  188. And I visit the shared link I wrote down
  189. And I authenticate with password "fedcba"
  190. Then I see that the current page is the Authenticate page for the shared link I wrote down
  191. And I see that a wrong password for the shared file message is shown
  192. Scenario: show the input field for tags in the details view
  193. Given I am logged in
  194. And I open the details view for "welcome.txt"
  195. And I see that the details view for "All files" section is open
  196. When I open the input field for tags in the details view
  197. Then I see that the input field for tags in the details view is shown
  198. Scenario: show the input field for tags in the details view after the sharing tab has loaded
  199. Given I am logged in
  200. And I open the details view for "welcome.txt"
  201. And I see that the details view for "All files" section is open
  202. And I open the "Sharing" tab in the details view
  203. And I see that the "Sharing" tab in the details view is eventually loaded
  204. When I open the input field for tags in the details view
  205. Then I see that the input field for tags in the details view is shown
  206. Scenario: create tags using the Administration settings
  207. Given I am logged in as the admin
  208. And I visit the settings page
  209. And I open the "Workflow" section
  210. # The "create" button does nothing before JavaScript was initialized, and
  211. # the only way to detect that is waiting for the button to select tags to be
  212. # shown.
  213. And I see that the button to select tags is shown
  214. When I create the tag "tag1" in the settings
  215. Then I see that the dropdown for tags in the settings eventually contains the tag "tag1"
  216. Scenario: add tags using the dropdown in the details view
  217. Given I am logged in as the admin
  218. And I visit the settings page
  219. And I open the "Workflow" section
  220. # The "create" button does nothing before JavaScript was initialized, and
  221. # the only way to detect that is waiting for the button to select tags to be
  222. # shown.
  223. And I see that the button to select tags is shown
  224. And I create the tag "tag1" in the settings
  225. And I create the tag "tag2" in the settings
  226. And I create the tag "tag3" in the settings
  227. And I create the tag "tag4" in the settings
  228. And I see that the dropdown for tags in the settings eventually contains the tag "tag1"
  229. And I see that the dropdown for tags in the settings eventually contains the tag "tag2"
  230. And I see that the dropdown for tags in the settings eventually contains the tag "tag3"
  231. And I see that the dropdown for tags in the settings eventually contains the tag "tag4"
  232. And I log out
  233. And I am logged in
  234. And I open the details view for "welcome.txt"
  235. And I open the input field for tags in the details view
  236. # When the input field is opened the dropdown is also opened automatically.
  237. When I check the tag "tag2" in the dropdown for tags in the details view
  238. And I check the tag "tag4" in the dropdown for tags in the details view
  239. Then I see that the tag "tag2" in the dropdown for tags in the details view is checked
  240. And I see that the tag "tag4" in the dropdown for tags in the details view is checked
  241. And I see that the input field for tags in the details view contains the tag "tag2"
  242. And I see that the input field for tags in the details view contains the tag "tag4"
  243. Scenario: remove tags using the dropdown in the details view
  244. Given I am logged in as the admin
  245. And I visit the settings page
  246. And I open the "Workflow" section
  247. # The "create" button does nothing before JavaScript was initialized, and
  248. # the only way to detect that is waiting for the button to select tags to be
  249. # shown.
  250. And I see that the button to select tags is shown
  251. And I create the tag "tag1" in the settings
  252. And I create the tag "tag2" in the settings
  253. And I create the tag "tag3" in the settings
  254. And I create the tag "tag4" in the settings
  255. And I see that the dropdown for tags in the settings eventually contains the tag "tag1"
  256. And I see that the dropdown for tags in the settings eventually contains the tag "tag2"
  257. And I see that the dropdown for tags in the settings eventually contains the tag "tag3"
  258. And I see that the dropdown for tags in the settings eventually contains the tag "tag4"
  259. And I log out
  260. And I am logged in
  261. And I open the details view for "welcome.txt"
  262. And I open the input field for tags in the details view
  263. # When the input field is opened the dropdown is also opened automatically.
  264. And I check the tag "tag2" in the dropdown for tags in the details view
  265. And I check the tag "tag4" in the dropdown for tags in the details view
  266. And I check the tag "tag3" in the dropdown for tags in the details view
  267. When I uncheck the tag "tag2" in the dropdown for tags in the details view
  268. And I uncheck the tag "tag4" in the dropdown for tags in the details view
  269. Then I see that the tag "tag2" in the dropdown for tags in the details view is not checked
  270. And I see that the tag "tag4" in the dropdown for tags in the details view is not checked
  271. And I see that the tag "tag3" in the dropdown for tags in the details view is checked
  272. And I see that the input field for tags in the details view does not contain the tag "tag2"
  273. And I see that the input field for tags in the details view does not contain the tag "tag4"
  274. And I see that the input field for tags in the details view contains the tag "tag3"
  275. Scenario: marking a file as favorite causes the file list to be sorted again
  276. Given I am logged in
  277. And I create a new folder named "A name alphabetically lower than welcome.txt"
  278. And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list
  279. # To mark the file as favorite the file actions menu has to be shown but, as
  280. # the details view is opened automatically when the folder is created,
  281. # clicking on the menu trigger could fail if it is covered by the details
  282. # view due to its opening animation. Instead of ensuring that the animations
  283. # of the contents and the details view have both finished it is easier to
  284. # close the details view and wait until it is closed before continuing.
  285. And I close the details view
  286. And I see that the details view is closed
  287. When I mark "welcome.txt" as favorite
  288. Then I see that "welcome.txt" is marked as favorite
  289. And I see that "welcome.txt" precedes "A name alphabetically lower than welcome.txt" in the file list
  290. Scenario: unmarking a file as favorite causes the file list to be sorted again
  291. Given I am logged in
  292. And I create a new folder named "A name alphabetically lower than welcome.txt"
  293. And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list
  294. # To mark the file as favorite the file actions menu has to be shown but, as
  295. # the details view is opened automatically when the folder is created,
  296. # clicking on the menu trigger could fail if it is covered by the details
  297. # view due to its opening animation. Instead of ensuring that the animations
  298. # of the contents and the details view have both finished it is easier to
  299. # close the details view and wait until it is closed before continuing.
  300. And I close the details view
  301. And I see that the details view is closed
  302. And I mark "welcome.txt" as favorite
  303. And I see that "welcome.txt" is marked as favorite
  304. And I see that "welcome.txt" precedes "A name alphabetically lower than welcome.txt" in the file list
  305. When I unmark "welcome.txt" as favorite
  306. Then I see that "welcome.txt" is not marked as favorite
  307. And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list