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.feature 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. Feature: app-files
  2. Scenario: open and close the details view
  3. Given I am logged in
  4. When I open the details view for "welcome.txt"
  5. And I see that the details view is open
  6. And I close the details view
  7. Then I see that the details view is closed
  8. Scenario: open and close the details view twice
  9. Given I am logged in
  10. And I open the details view for "welcome.txt"
  11. And I see that the details view is open
  12. And I close the details view
  13. And I see that the details view is closed
  14. When I open the details view for "welcome.txt"
  15. And I see that the details view is open
  16. And I close the details view
  17. Then I see that the details view is closed
  18. Scenario: open and close the details view again after coming back from a different section
  19. Given I am logged in
  20. And I open the details view for "welcome.txt"
  21. And I see that the details view is open
  22. And I close the details view
  23. And I see that the details view is closed
  24. And I open the "Recent" section
  25. And I see that the current section is "Recent"
  26. And I open the details view for "welcome.txt"
  27. And I see that the details view is open
  28. And I close the details view
  29. And I see that the details view is closed
  30. When I open the "All files" section
  31. And I see that the current section is "All files"
  32. And I open the details view for "welcome.txt"
  33. And I see that the details view is open
  34. And I close the details view
  35. Then I see that the details view is closed
  36. Scenario: viewing a favorite file in its folder shows the correct sidebar view
  37. Given I am logged in
  38. And I create a new folder named "other"
  39. And I mark "other" as favorite
  40. And I mark "welcome.txt" as favorite
  41. And I see that "other" is marked as favorite
  42. And I see that "welcome.txt" is marked as favorite
  43. And I open the "Favorites" section
  44. And I open the details view for "other"
  45. And I see that the details view is open
  46. And I see that the file name shown in the details view is "other"
  47. When I view "welcome.txt" in folder
  48. Then I see that the current section is "All files"
  49. And I see that the details view is open
  50. And I see that the file name shown in the details view is "welcome.txt"
  51. When I open the details view for "other"
  52. And I see that the file name shown in the details view is "other"
  53. Scenario: viewing a favorite file in its folder does not prevent opening the details view in "All files" section
  54. Given I am logged in
  55. And I mark "welcome.txt" as favorite
  56. And I see that "welcome.txt" is marked as favorite
  57. And I open the "Favorites" section
  58. And I open the details view for "welcome.txt"
  59. And I see that the details view is open
  60. And I view "welcome.txt" in folder
  61. And I see that the current section is "All files"
  62. When I open the details view for "welcome.txt"
  63. Then I see that the details view is open
  64. Scenario: show recent files
  65. Given I am logged in
  66. And I create a new folder named "Folder just created"
  67. When I open the "Recent" section
  68. Then I see that the current section is "Recent"
  69. Then I see that the file list contains a file named "Folder just created"
  70. Scenario: show recent files for a second time
  71. Given I am logged in
  72. And I open the "Recent" section
  73. And I see that the current section is "Recent"
  74. And I open the "All files" section
  75. And I see that the current section is "All files"
  76. And I create a new folder named "Folder just created"
  77. When I open the "Recent" section
  78. Then I see that the current section is "Recent"
  79. Then I see that the file list contains a file named "Folder just created"
  80. Scenario: show favorites
  81. Given I am logged in
  82. And I mark "welcome.txt" as favorite
  83. When I open the "Favorites" section
  84. Then I see that the current section is "Favorites"
  85. Then I see that the file list contains a file named "welcome.txt"
  86. Scenario: show favorites for a second time
  87. Given I am logged in
  88. And I open the "Favorites" section
  89. And I see that the current section is "Favorites"
  90. And I open the "All files" section
  91. And I see that the current section is "All files"
  92. And I mark "welcome.txt" as favorite
  93. When I open the "Favorites" section
  94. Then I see that the current section is "Favorites"
  95. Then I see that the file list contains a file named "welcome.txt"
  96. Scenario: show shares
  97. Given I am logged in
  98. And I share the link for "welcome.txt"
  99. When I open the "Shares" section
  100. Then I see that the current section is "Shares"
  101. Then I see that the file list contains a file named "welcome.txt"
  102. Scenario: show shares for a second time
  103. Given I am logged in
  104. And I open the "Shares" section
  105. And I see that the current section is "Shares"
  106. And I open the "All files" section
  107. And I see that the current section is "All files"
  108. And I share the link for "welcome.txt"
  109. When I open the "Shares" section
  110. Then I see that the current section is "Shares"
  111. Then I see that the file list contains a file named "welcome.txt"
  112. Scenario: show deleted files
  113. Given I am logged in
  114. And I delete "welcome.txt"
  115. When I open the "Deleted files" section
  116. Then I see that the current section is "Deleted files"
  117. Then I see that the file list contains a file named "welcome.txt"
  118. Scenario: show deleted files for a second time
  119. Given I am logged in
  120. And I open the "Deleted files" section
  121. And I see that the current section is "Deleted files"
  122. And I open the "All files" section
  123. And I see that the current section is "All files"
  124. And I delete "welcome.txt"
  125. When I open the "Deleted files" section
  126. Then I see that the current section is "Deleted files"
  127. Then I see that the file list contains a file named "welcome.txt"
  128. Scenario: move a file to another folder
  129. Given I am logged in
  130. And I create a new folder named "Destination"
  131. When I start the move or copy operation for "welcome.txt"
  132. And I select "Destination" in the file picker
  133. And I move to the last selected folder in the file picker
  134. Then I see that the file list does not contain a file named "welcome.txt"
  135. And I enter in the folder named "Destination"
  136. And I see that the file list contains a file named "welcome.txt"
  137. Scenario: move a selection to another folder
  138. Given I am logged in
  139. And I create a new folder named "Folder"
  140. And I create a new folder named "Not selected folder"
  141. And I create a new folder named "Destination"
  142. When I select "welcome.txt"
  143. And I select "Folder"
  144. And I start the move or copy operation for the selected files
  145. And I select "Destination" in the file picker
  146. And I move to the last selected folder in the file picker
  147. Then I see that the file list does not contain a file named "welcome.txt"
  148. And I see that the file list does not contain a file named "Folder"
  149. And I see that the file list contains a file named "Not selected folder"
  150. And I enter in the folder named "Destination"
  151. And I see that the file list contains a file named "welcome.txt"
  152. And I see that the file list contains a file named "Folder"
  153. And I see that the file list does not contain a file named "Not selected folder"
  154. Scenario: copy a file to another folder
  155. Given I am logged in
  156. And I create a new folder named "Destination"
  157. When I start the move or copy operation for "welcome.txt"
  158. And I select "Destination" in the file picker
  159. And I copy to the last selected folder in the file picker
  160. Then I enter in the folder named "Destination"
  161. # The file will appear in the destination once the copy operation finishes
  162. And I see that the file list contains a file named "welcome.txt"
  163. # The Files app is open again to reload the file list in the root folder
  164. And I open the Files app
  165. And I see that the file list contains a file named "welcome.txt"
  166. Scenario: copy a selection to another folder
  167. Given I am logged in
  168. And I create a new folder named "Folder"
  169. And I create a new folder named "Not selected folder"
  170. And I create a new folder named "Destination"
  171. When I select "welcome.txt"
  172. And I select "Folder"
  173. And I start the move or copy operation for the selected files
  174. And I select "Destination" in the file picker
  175. And I copy to the last selected folder in the file picker
  176. Then I enter in the folder named "Destination"
  177. # The files will appear in the destination once the copy operation finishes
  178. And I see that the file list contains a file named "welcome.txt"
  179. And I see that the file list contains a file named "Folder"
  180. And I see that the file list does not contain a file named "Not selected folder"
  181. # The Files app is open again to reload the file list in the root folder
  182. And I open the Files app
  183. And I see that the file list contains a file named "welcome.txt"
  184. And I see that the file list contains a file named "Folder"
  185. And I see that the file list contains a file named "Not selected folder"
  186. Scenario: copy a file in its same folder
  187. Given I am logged in
  188. When I start the move or copy operation for "welcome.txt"
  189. # No folder was explicitly selected, so the last selected folder is the
  190. # current folder.
  191. And I copy to the last selected folder in the file picker
  192. Then I see that the file list contains a file named "welcome.txt"
  193. And I see that the file list contains a file named "welcome (copy).txt"
  194. Scenario: copy a file twice in its same folder
  195. Given I am logged in
  196. And I start the move or copy operation for "welcome.txt"
  197. # No folder was explicitly selected, so the last selected folder is the
  198. # current folder.
  199. And I copy to the last selected folder in the file picker
  200. When I start the move or copy operation for "welcome.txt"
  201. And I copy to the last selected folder in the file picker
  202. Then I see that the file list contains a file named "welcome.txt"
  203. And I see that the file list contains a file named "welcome (copy).txt"
  204. And I see that the file list contains a file named "welcome (copy 2).txt"
  205. Scenario: copy a copy of a file in its same folder
  206. Given I am logged in
  207. And I start the move or copy operation for "welcome.txt"
  208. # No folder was explicitly selected, so the last selected folder is the
  209. # current folder.
  210. And I copy to the last selected folder in the file picker
  211. When I start the move or copy operation for "welcome (copy).txt"
  212. And I copy to the last selected folder in the file picker
  213. Then I see that the file list contains a file named "welcome.txt"
  214. And I see that the file list contains a file named "welcome (copy).txt"
  215. And I see that the file list contains a file named "welcome (copy 2).txt"
  216. Scenario: rename a file with the details view open
  217. Given I am logged in
  218. And I open the details view for "welcome.txt"
  219. When I rename "welcome.txt" to "farewell.txt"
  220. Then I see that the file list contains a file named "farewell.txt"
  221. And I see that the file name shown in the details view is "farewell.txt"
  222. Scenario: marking a file as favorite causes the file list to be sorted again
  223. Given I am logged in
  224. And I create a new folder named "A name alphabetically lower than welcome.txt"
  225. And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list
  226. # To mark the file as favorite the file actions menu has to be shown but, as
  227. # the details view is opened automatically when the folder is created,
  228. # clicking on the menu trigger could fail if it is covered by the details
  229. # view due to its opening animation. Instead of ensuring that the animations
  230. # of the contents and the details view have both finished it is easier to
  231. # close the details view and wait until it is closed before continuing.
  232. And I close the details view
  233. And I see that the details view is closed
  234. When I mark "welcome.txt" as favorite
  235. Then I see that "welcome.txt" is marked as favorite
  236. And I see that "welcome.txt" precedes "A name alphabetically lower than welcome.txt" in the file list
  237. Scenario: unmarking a file as favorite causes the file list to be sorted again
  238. Given I am logged in
  239. And I create a new folder named "A name alphabetically lower than welcome.txt"
  240. And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list
  241. # To mark the file as favorite the file actions menu has to be shown but, as
  242. # the details view is opened automatically when the folder is created,
  243. # clicking on the menu trigger could fail if it is covered by the details
  244. # view due to its opening animation. Instead of ensuring that the animations
  245. # of the contents and the details view have both finished it is easier to
  246. # close the details view and wait until it is closed before continuing.
  247. And I close the details view
  248. And I see that the details view is closed
  249. And I mark "welcome.txt" as favorite
  250. And I see that "welcome.txt" is marked as favorite
  251. And I see that "welcome.txt" precedes "A name alphabetically lower than welcome.txt" in the file list
  252. When I unmark "welcome.txt" as favorite
  253. Then I see that "welcome.txt" is not marked as favorite
  254. And I see that "A name alphabetically lower than welcome.txt" precedes "welcome.txt" in the file list
  255. Scenario: mark a file as favorite in the details view
  256. Given I am logged in
  257. And I open the details view for "welcome.txt"
  258. And I see that the details view is open
  259. When I mark the file as favorite in the details view
  260. Then I see that "welcome.txt" is marked as favorite
  261. And I see that the file is marked as favorite in the details view
  262. Scenario: unmark a file as favorite in the details view
  263. Given I am logged in
  264. And I open the details view for "welcome.txt"
  265. And I see that the details view is open
  266. And I mark the file as favorite in the details view
  267. And I see that "welcome.txt" is marked as favorite
  268. And I see that the file is marked as favorite in the details view
  269. When I unmark the file as favorite in the details view
  270. Then I see that "welcome.txt" is not marked as favorite
  271. And I see that the file is not marked as favorite in the details view