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.

webdav-related.feature 25KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. Feature: webdav-related
  2. Background:
  3. Given using api version "1"
  4. Scenario: Unauthenticated call old dav path
  5. Given using old dav path
  6. When connecting to dav endpoint
  7. Then the HTTP status code should be "401"
  8. And there are no duplicate headers
  9. And The following headers should be set
  10. |WWW-Authenticate|Basic realm="Nextcloud", charset="UTF-8"|
  11. Scenario: Unauthenticated call new dav path
  12. Given using new dav path
  13. When connecting to dav endpoint
  14. Then the HTTP status code should be "401"
  15. And there are no duplicate headers
  16. And The following headers should be set
  17. |WWW-Authenticate|Basic realm="Nextcloud", charset="UTF-8"|
  18. Scenario: Moving a file
  19. Given using old dav path
  20. And As an "admin"
  21. And user "user0" exists
  22. And As an "user0"
  23. When User "user0" moves file "/welcome.txt" to "/FOLDER/welcome.txt"
  24. Then the HTTP status code should be "201"
  25. And Downloaded content when downloading file "/FOLDER/welcome.txt" with range "bytes=0-6" should be "Welcome"
  26. Scenario: Moving and overwriting a file old way
  27. Given using old dav path
  28. And As an "admin"
  29. And user "user0" exists
  30. And As an "user0"
  31. When User "user0" moves file "/welcome.txt" to "/textfile0.txt"
  32. Then the HTTP status code should be "204"
  33. And Downloaded content when downloading file "/textfile0.txt" with range "bytes=0-6" should be "Welcome"
  34. Scenario: Moving a file to a folder with no permissions
  35. Given using old dav path
  36. And As an "admin"
  37. And user "user0" exists
  38. And user "user1" exists
  39. And As an "user1"
  40. And user "user1" created a folder "/testshare"
  41. And as "user1" creating a share with
  42. | path | testshare |
  43. | shareType | 0 |
  44. | permissions | 1 |
  45. | shareWith | user0 |
  46. And user "user0" accepts last share
  47. And As an "user0"
  48. And User "user0" moves file "/textfile0.txt" to "/testshare/textfile0.txt"
  49. And the HTTP status code should be "403"
  50. When Downloading file "/testshare/textfile0.txt"
  51. Then the HTTP status code should be "404"
  52. Scenario: Moving a file to overwrite a file in a folder with no permissions
  53. Given using old dav path
  54. And As an "admin"
  55. And user "user0" exists
  56. And user "user1" exists
  57. And As an "user1"
  58. And user "user1" created a folder "/testshare"
  59. And as "user1" creating a share with
  60. | path | testshare |
  61. | shareType | 0 |
  62. | permissions | 1 |
  63. | shareWith | user0 |
  64. And user "user0" accepts last share
  65. And User "user1" copies file "/welcome.txt" to "/testshare/overwritethis.txt"
  66. And As an "user0"
  67. When User "user0" moves file "/textfile0.txt" to "/testshare/overwritethis.txt"
  68. Then the HTTP status code should be "403"
  69. And Downloaded content when downloading file "/testshare/overwritethis.txt" with range "bytes=0-6" should be "Welcome"
  70. Scenario: Copying a file
  71. Given using old dav path
  72. And As an "admin"
  73. And user "user0" exists
  74. And As an "user0"
  75. When User "user0" copies file "/welcome.txt" to "/FOLDER/welcome.txt"
  76. Then the HTTP status code should be "201"
  77. And Downloaded content when downloading file "/FOLDER/welcome.txt" with range "bytes=0-6" should be "Welcome"
  78. Scenario: Copying and overwriting a file
  79. Given using old dav path
  80. And As an "admin"
  81. And user "user0" exists
  82. And As an "user0"
  83. When User "user0" copies file "/welcome.txt" to "/textfile1.txt"
  84. Then the HTTP status code should be "204"
  85. And Downloaded content when downloading file "/textfile1.txt" with range "bytes=0-6" should be "Welcome"
  86. Scenario: Copying a file to a folder with no permissions
  87. Given using old dav path
  88. And As an "admin"
  89. And user "user0" exists
  90. And user "user1" exists
  91. And As an "user1"
  92. And user "user1" created a folder "/testshare"
  93. And as "user1" creating a share with
  94. | path | testshare |
  95. | shareType | 0 |
  96. | permissions | 1 |
  97. | shareWith | user0 |
  98. And user "user0" accepts last share
  99. And As an "user0"
  100. When User "user0" copies file "/textfile0.txt" to "/testshare/textfile0.txt"
  101. Then the HTTP status code should be "403"
  102. And Downloading file "/testshare/textfile0.txt"
  103. And the HTTP status code should be "404"
  104. Scenario: Copying a file to overwrite a file into a folder with no permissions
  105. Given using old dav path
  106. And As an "admin"
  107. And user "user0" exists
  108. And user "user1" exists
  109. And As an "user1"
  110. And user "user1" created a folder "/testshare"
  111. And as "user1" creating a share with
  112. | path | testshare |
  113. | shareType | 0 |
  114. | permissions | 1 |
  115. | shareWith | user0 |
  116. And user "user0" accepts last share
  117. And User "user1" copies file "/welcome.txt" to "/testshare/overwritethis.txt"
  118. And As an "user0"
  119. When User "user0" copies file "/textfile0.txt" to "/testshare/overwritethis.txt"
  120. Then the HTTP status code should be "403"
  121. And Downloaded content when downloading file "/testshare/overwritethis.txt" with range "bytes=0-6" should be "Welcome"
  122. Scenario: download a file with range
  123. Given using old dav path
  124. And As an "admin"
  125. When Downloading file "/welcome.txt" with range "bytes=52-78"
  126. Then Downloaded content should be "example file for developers"
  127. Scenario: Upload forbidden if quota is 0
  128. Given using old dav path
  129. And As an "admin"
  130. And user "user0" exists
  131. And user "user0" has a quota of "0"
  132. When User "user0" uploads file "data/textfile.txt" to "/asdf.txt"
  133. Then the HTTP status code should be "507"
  134. Scenario: Retrieving folder quota when no quota is set
  135. Given using old dav path
  136. And As an "admin"
  137. And user "user0" exists
  138. When user "user0" has unlimited quota
  139. Then as "user0" gets properties of folder "/" with
  140. |{DAV:}quota-available-bytes|
  141. And the single response should contain a property "{DAV:}quota-available-bytes" with value "-3"
  142. Scenario: Retrieving folder quota when quota is set
  143. Given using old dav path
  144. And As an "admin"
  145. And user "user0" exists
  146. When user "user0" has a quota of "10 MB"
  147. Then as "user0" gets properties of folder "/" with
  148. |{DAV:}quota-available-bytes|
  149. And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485421"
  150. Scenario: Retrieving folder quota of shared folder with quota when no quota is set for recipient
  151. Given using old dav path
  152. And As an "admin"
  153. And user "user0" exists
  154. And user "user1" exists
  155. And user "user0" has unlimited quota
  156. And user "user1" has a quota of "10 MB"
  157. And As an "user1"
  158. And user "user1" created a folder "/testquota"
  159. And as "user1" creating a share with
  160. | path | testquota |
  161. | shareType | 0 |
  162. | permissions | 31 |
  163. | shareWith | user0 |
  164. And user "user0" accepts last share
  165. Then as "user0" gets properties of folder "/testquota" with
  166. |{DAV:}quota-available-bytes|
  167. And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485421"
  168. Scenario: Uploading a file as recipient using webdav having quota
  169. Given using old dav path
  170. And As an "admin"
  171. And user "user0" exists
  172. And user "user1" exists
  173. And user "user0" has a quota of "10 MB"
  174. And user "user1" has a quota of "10 MB"
  175. And As an "user1"
  176. And user "user1" created a folder "/testquota"
  177. And as "user1" creating a share with
  178. | path | testquota |
  179. | shareType | 0 |
  180. | permissions | 31 |
  181. | shareWith | user0 |
  182. And user "user0" accepts last share
  183. And As an "user0"
  184. When User "user0" uploads file "data/textfile.txt" to "/testquota/asdf.txt"
  185. Then the HTTP status code should be "201"
  186. Scenario: Retrieving folder quota when quota is set and a file was uploaded
  187. Given using old dav path
  188. And As an "admin"
  189. And user "user0" exists
  190. And user "user0" has a quota of "1 KB"
  191. And user "user0" adds a file of 93 bytes to "/prueba.txt"
  192. When as "user0" gets properties of folder "/" with
  193. |{DAV:}quota-available-bytes|
  194. Then the single response should contain a property "{DAV:}quota-available-bytes" with value "592"
  195. Scenario: Retrieving folder quota when quota is set and a file was received
  196. Given using old dav path
  197. And As an "admin"
  198. And user "user0" exists
  199. And user "user1" exists
  200. And user "user1" has a quota of "1 KB"
  201. And user "user0" adds a file of 93 bytes to "/user0.txt"
  202. And file "user0.txt" of user "user0" is shared with user "user1"
  203. And user "user1" accepts last share
  204. When as "user1" gets properties of folder "/" with
  205. |{DAV:}quota-available-bytes|
  206. Then the single response should contain a property "{DAV:}quota-available-bytes" with value "685"
  207. Scenario: download a public shared file with range
  208. Given user "user0" exists
  209. And As an "user0"
  210. When creating a share with
  211. | path | welcome.txt |
  212. | shareType | 3 |
  213. And Downloading last public shared file with range "bytes=52-78"
  214. Then Downloaded content should be "example file for developers"
  215. Scenario: download a public shared file inside a folder with range
  216. Given user "user0" exists
  217. And As an "user0"
  218. When creating a share with
  219. | path | PARENT |
  220. | shareType | 3 |
  221. And Downloading last public shared file inside a folder "/parent.txt" with range "bytes=1-8"
  222. Then Downloaded content should be "extcloud"
  223. Scenario: Downloading a file on the old endpoint should serve security headers
  224. Given using old dav path
  225. And As an "admin"
  226. When Downloading file "/welcome.txt"
  227. Then The following headers should be set
  228. |Content-Disposition|attachment; filename*=UTF-8''welcome.txt; filename="welcome.txt"|
  229. |Content-Security-Policy|default-src 'none';|
  230. |X-Content-Type-Options |nosniff|
  231. |X-Frame-Options|SAMEORIGIN|
  232. |X-Permitted-Cross-Domain-Policies|none|
  233. |X-Robots-Tag|none|
  234. |X-XSS-Protection|1; mode=block|
  235. And Downloaded content should start with "Welcome to your Nextcloud account!"
  236. Scenario: Doing a GET with a web login should work without CSRF token on the old backend
  237. Given Logging in using web as "admin"
  238. When Sending a "GET" to "/remote.php/webdav/welcome.txt" without requesttoken
  239. Then Downloaded content should start with "Welcome to your Nextcloud account!"
  240. Then the HTTP status code should be "200"
  241. Scenario: Doing a GET with a web login should work with CSRF token on the old backend
  242. Given Logging in using web as "admin"
  243. When Sending a "GET" to "/remote.php/webdav/welcome.txt" with requesttoken
  244. Then Downloaded content should start with "Welcome to your Nextcloud account!"
  245. Then the HTTP status code should be "200"
  246. Scenario: Doing a PROPFIND with a web login should not work without CSRF token on the old backend
  247. Given Logging in using web as "admin"
  248. When Sending a "PROPFIND" to "/remote.php/webdav/welcome.txt" without requesttoken
  249. Then the HTTP status code should be "401"
  250. Scenario: Doing a PROPFIND with a web login should work with CSRF token on the old backend
  251. Given Logging in using web as "admin"
  252. When Sending a "PROPFIND" to "/remote.php/webdav/welcome.txt" with requesttoken
  253. Then the HTTP status code should be "207"
  254. Scenario: Upload chunked file asc
  255. Given user "user0" exists
  256. And user "user0" uploads chunk file "1" of "3" with "AAAAA" to "/myChunkedFile.txt"
  257. And user "user0" uploads chunk file "2" of "3" with "BBBBB" to "/myChunkedFile.txt"
  258. And user "user0" uploads chunk file "3" of "3" with "CCCCC" to "/myChunkedFile.txt"
  259. When As an "user0"
  260. And Downloading file "/myChunkedFile.txt"
  261. Then Downloaded content should be "AAAAABBBBBCCCCC"
  262. Scenario: Upload chunked file desc
  263. Given user "user0" exists
  264. And user "user0" uploads chunk file "3" of "3" with "CCCCC" to "/myChunkedFile.txt"
  265. And user "user0" uploads chunk file "2" of "3" with "BBBBB" to "/myChunkedFile.txt"
  266. And user "user0" uploads chunk file "1" of "3" with "AAAAA" to "/myChunkedFile.txt"
  267. When As an "user0"
  268. And Downloading file "/myChunkedFile.txt"
  269. Then Downloaded content should be "AAAAABBBBBCCCCC"
  270. Scenario: Upload chunked file random
  271. Given user "user0" exists
  272. And user "user0" uploads chunk file "2" of "3" with "BBBBB" to "/myChunkedFile.txt"
  273. And user "user0" uploads chunk file "3" of "3" with "CCCCC" to "/myChunkedFile.txt"
  274. And user "user0" uploads chunk file "1" of "3" with "AAAAA" to "/myChunkedFile.txt"
  275. When As an "user0"
  276. And Downloading file "/myChunkedFile.txt"
  277. Then Downloaded content should be "AAAAABBBBBCCCCC"
  278. Scenario: A file that is not shared does not have a share-types property
  279. Given user "user0" exists
  280. And user "user0" created a folder "/test"
  281. When as "user0" gets properties of folder "/test" with
  282. |{http://owncloud.org/ns}share-types|
  283. Then the response should contain an empty property "{http://owncloud.org/ns}share-types"
  284. Scenario: A file that is shared to a user has a share-types property
  285. Given user "user0" exists
  286. And user "user1" exists
  287. And user "user0" created a folder "/test"
  288. And as "user0" creating a share with
  289. | path | test |
  290. | shareType | 0 |
  291. | permissions | 31 |
  292. | shareWith | user1 |
  293. When as "user0" gets properties of folder "/test" with
  294. |{http://owncloud.org/ns}share-types|
  295. Then the response should contain a share-types property with
  296. | 0 |
  297. Scenario: A file that is shared to a group has a share-types property
  298. Given user "user0" exists
  299. And group "group1" exists
  300. And user "user0" created a folder "/test"
  301. And as "user0" creating a share with
  302. | path | test |
  303. | shareType | 1 |
  304. | permissions | 31 |
  305. | shareWith | group1 |
  306. When as "user0" gets properties of folder "/test" with
  307. |{http://owncloud.org/ns}share-types|
  308. Then the response should contain a share-types property with
  309. | 1 |
  310. Scenario: A file that is shared by link has a share-types property
  311. Given user "user0" exists
  312. And user "user0" created a folder "/test"
  313. And as "user0" creating a share with
  314. | path | test |
  315. | shareType | 3 |
  316. | permissions | 31 |
  317. When as "user0" gets properties of folder "/test" with
  318. |{http://owncloud.org/ns}share-types|
  319. Then the response should contain a share-types property with
  320. | 3 |
  321. Scenario: A file that is shared by user,group and link has a share-types property
  322. Given user "user0" exists
  323. And user "user1" exists
  324. And group "group2" exists
  325. And user "user0" created a folder "/test"
  326. And as "user0" creating a share with
  327. | path | test |
  328. | shareType | 0 |
  329. | permissions | 31 |
  330. | shareWith | user1 |
  331. And as "user0" creating a share with
  332. | path | test |
  333. | shareType | 1 |
  334. | permissions | 31 |
  335. | shareWith | group2 |
  336. And as "user0" creating a share with
  337. | path | test |
  338. | shareType | 3 |
  339. | permissions | 31 |
  340. When as "user0" gets properties of folder "/test" with
  341. |{http://owncloud.org/ns}share-types|
  342. Then the response should contain a share-types property with
  343. | 0 |
  344. | 1 |
  345. | 3 |
  346. Scenario: Upload chunked file asc with new chunking
  347. Given using new dav path
  348. And user "user0" exists
  349. And user "user0" creates a new chunking upload with id "chunking-42"
  350. And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42"
  351. And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42"
  352. And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42"
  353. And user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt"
  354. When As an "user0"
  355. And Downloading file "/myChunkedFile.txt"
  356. Then Downloaded content should be "AAAAABBBBBCCCCC"
  357. Scenario: Upload chunked file desc with new chunking
  358. Given using new dav path
  359. And user "user0" exists
  360. And user "user0" creates a new chunking upload with id "chunking-42"
  361. And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42"
  362. And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42"
  363. And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42"
  364. And user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt"
  365. When As an "user0"
  366. And Downloading file "/myChunkedFile.txt"
  367. Then Downloaded content should be "AAAAABBBBBCCCCC"
  368. Scenario: Upload chunked file random with new chunking
  369. Given using new dav path
  370. And user "user0" exists
  371. And user "user0" creates a new chunking upload with id "chunking-42"
  372. And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42"
  373. And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42"
  374. And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42"
  375. And user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt"
  376. When As an "user0"
  377. And Downloading file "/myChunkedFile.txt"
  378. Then Downloaded content should be "AAAAABBBBBCCCCC"
  379. Scenario: A disabled user cannot use webdav
  380. Given user "userToBeDisabled" exists
  381. And As an "admin"
  382. And assure user "userToBeDisabled" is disabled
  383. When Downloading file "/welcome.txt" as "userToBeDisabled"
  384. Then the HTTP status code should be "503"
  385. Scenario: Copying files into a folder with edit permissions
  386. Given using dav path "remote.php/webdav"
  387. And user "user0" exists
  388. And user "user1" exists
  389. And As an "user1"
  390. And user "user1" created a folder "/testcopypermissionsAllowed"
  391. And as "user1" creating a share with
  392. | path | testcopypermissionsAllowed |
  393. | shareType | 0 |
  394. | permissions | 31 |
  395. | shareWith | user0 |
  396. And user "user0" accepts last share
  397. And User "user0" uploads file with content "copytest" to "/copytest.txt"
  398. When User "user0" copies file "/copytest.txt" to "/testcopypermissionsAllowed/copytest.txt"
  399. Then the HTTP status code should be "201"
  400. Scenario: Copying files into a folder without edit permissions
  401. Given using dav path "remote.php/webdav"
  402. And user "user0" exists
  403. And user "user1" exists
  404. And As an "user1"
  405. And user "user1" created a folder "/testcopypermissionsNotAllowed"
  406. And as "user1" creating a share with
  407. | path | testcopypermissionsNotAllowed |
  408. | shareType | 0 |
  409. | permissions | 1 |
  410. | shareWith | user0 |
  411. And user "user0" accepts last share
  412. And User "user0" uploads file with content "copytest" to "/copytest.txt"
  413. When User "user0" copies file "/copytest.txt" to "/testcopypermissionsNotAllowed/copytest.txt"
  414. Then the HTTP status code should be "403"
  415. Scenario: Uploading a file as recipient with limited permissions
  416. Given using new dav path
  417. And As an "admin"
  418. And user "user0" exists
  419. And user "user1" exists
  420. And user "user0" has a quota of "10 MB"
  421. And user "user1" has a quota of "10 MB"
  422. And As an "user1"
  423. And user "user1" created a folder "/testfolder"
  424. And as "user1" creating a share with
  425. | path | testfolder |
  426. | shareType | 0 |
  427. | permissions | 23 |
  428. | shareWith | user0 |
  429. And user "user0" accepts last share
  430. And As an "user0"
  431. And User "user0" uploads file "data/textfile.txt" to "/testfolder/asdf.txt"
  432. And As an "user1"
  433. When User "user1" deletes file "/testfolder/asdf.txt"
  434. Then the HTTP status code should be "204"
  435. Scenario: Creating a folder
  436. Given using old dav path
  437. And user "user0" exists
  438. And user "user0" created a folder "/test_folder"
  439. When as "user0" gets properties of folder "/test_folder" with
  440. |{DAV:}resourcetype|
  441. Then the single response should contain a property "{DAV:}resourcetype" with value "{DAV:}collection"
  442. Scenario: Creating a folder with special chars
  443. Given using old dav path
  444. And user "user0" exists
  445. And user "user0" created a folder "/test_folder:5"
  446. When as "user0" gets properties of folder "/test_folder:5" with
  447. |{DAV:}resourcetype|
  448. Then the single response should contain a property "{DAV:}resourcetype" with value "{DAV:}collection"
  449. Scenario: Removing everything of a folder
  450. Given using old dav path
  451. And As an "admin"
  452. And user "user0" exists
  453. And As an "user0"
  454. And User "user0" moves file "/welcome.txt" to "/FOLDER/welcome.txt"
  455. And user "user0" created a folder "/FOLDER/SUBFOLDER"
  456. And User "user0" copies file "/textfile0.txt" to "/FOLDER/SUBFOLDER/testfile0.txt"
  457. When User "user0" deletes everything from folder "/FOLDER/"
  458. Then user "user0" should see following elements
  459. | /FOLDER/ |
  460. | /PARENT/ |
  461. | /PARENT/parent.txt |
  462. | /textfile0.txt |
  463. | /textfile1.txt |
  464. | /textfile2.txt |
  465. | /textfile3.txt |
  466. | /textfile4.txt |
  467. Scenario: Removing everything of a folder using new dav path
  468. Given using new dav path
  469. And As an "admin"
  470. And user "user0" exists
  471. And As an "user0"
  472. And User "user0" moves file "/welcome.txt" to "/FOLDER/welcome.txt"
  473. And user "user0" created a folder "/FOLDER/SUBFOLDER"
  474. And User "user0" copies file "/textfile0.txt" to "/FOLDER/SUBFOLDER/testfile0.txt"
  475. When User "user0" deletes everything from folder "/FOLDER/"
  476. Then user "user0" should see following elements
  477. | /FOLDER/ |
  478. | /PARENT/ |
  479. | /PARENT/parent.txt |
  480. | /textfile0.txt |
  481. | /textfile1.txt |
  482. | /textfile2.txt |
  483. | /textfile3.txt |
  484. | /textfile4.txt |
  485. Scenario: Checking file id after a move using new endpoint
  486. Given using new dav path
  487. And user "user0" exists
  488. And User "user0" stores id of file "/textfile0.txt"
  489. When User "user0" moves file "/textfile0.txt" to "/FOLDER/textfile0.txt"
  490. Then User "user0" checks id of file "/FOLDER/textfile0.txt"
  491. Scenario: Checking file id after a move overwrite using new chunking endpoint
  492. Given using new dav path
  493. And user "user0" exists
  494. And User "user0" copies file "/textfile0.txt" to "/existingFile.txt"
  495. And User "user0" stores id of file "/existingFile.txt"
  496. And user "user0" creates a new chunking upload with id "chunking-42"
  497. And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42"
  498. And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42"
  499. And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42"
  500. When user "user0" moves new chunk file with id "chunking-42" to "/existingFile.txt"
  501. Then User "user0" checks id of file "/existingFile.txt"
  502. Scenario: Renaming a folder to a backslash encoded should return an error using old endpoint
  503. Given using old dav path
  504. And user "user0" exists
  505. And user "user0" created a folder "/testshare"
  506. When User "user0" moves folder "/testshare" to "/%5C"
  507. Then the HTTP status code should be "400"
  508. Scenario: Renaming a folder beginning with a backslash encoded should return an error using old endpoint
  509. Given using old dav path
  510. And user "user0" exists
  511. And user "user0" created a folder "/testshare"
  512. When User "user0" moves folder "/testshare" to "/%5Ctestshare"
  513. Then the HTTP status code should be "400"
  514. Scenario: Renaming a folder including a backslash encoded should return an error using old endpoint
  515. Given using old dav path
  516. And user "user0" exists
  517. And user "user0" created a folder "/testshare"
  518. When User "user0" moves folder "/testshare" to "/hola%5Chola"
  519. Then the HTTP status code should be "400"
  520. Scenario: Renaming a folder to a backslash encoded should return an error using new endpoint
  521. Given using new dav path
  522. And user "user0" exists
  523. And user "user0" created a folder "/testshare"
  524. When User "user0" moves folder "/testshare" to "/%5C"
  525. Then the HTTP status code should be "400"
  526. Scenario: Renaming a folder beginning with a backslash encoded should return an error using new endpoint
  527. Given using new dav path
  528. And user "user0" exists
  529. And user "user0" created a folder "/testshare"
  530. When User "user0" moves folder "/testshare" to "/%5Ctestshare"
  531. Then the HTTP status code should be "400"
  532. Scenario: Renaming a folder including a backslash encoded should return an error using new endpoint
  533. Given using new dav path
  534. And user "user0" exists
  535. And user "user0" created a folder "/testshare"
  536. When User "user0" moves folder "/testshare" to "/hola%5Chola"
  537. Then the HTTP status code should be "400"
  538. Scenario: Upload file via new chunking endpoint with wrong size header
  539. Given using new dav path
  540. And user "user0" exists
  541. And user "user0" creates a new chunking upload with id "chunking-42"
  542. And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42"
  543. And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42"
  544. And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42"
  545. When user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt" with size 5
  546. Then the HTTP status code should be "400"
  547. Scenario: Upload file via new chunking endpoint with correct size header
  548. Given using new dav path
  549. And user "user0" exists
  550. And user "user0" creates a new chunking upload with id "chunking-42"
  551. And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42"
  552. And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42"
  553. And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42"
  554. When user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt" with size 15
  555. Then the HTTP status code should be "201"
  556. Scenario: Upload bulked files
  557. Given user "user0" exists
  558. And user "user0" uploads bulked files "A.txt" with "AAAAA" and "B.txt" with "BBBBB" and "C.txt" with "CCCCC"
  559. When As an "user0"
  560. Then Downloading file "/A.txt"
  561. And Downloaded content should be "AAAAA"
  562. And File "/A.txt" should have prop "d:getlastmodified" equal to "Fri, 18 Mar 2005 01:58:31 GMT"
  563. And Downloading file "/B.txt"
  564. And Downloaded content should be "BBBBB"
  565. And File "/B.txt" should have prop "d:getlastmodified" equal to "Sat, 02 Jun 2040 03:57:02 GMT"
  566. And Downloading file "/C.txt"
  567. And Downloaded content should be "CCCCC"
  568. And File "/C.txt" should have prop "d:getlastmodified" equal to "Sun, 18 Aug 2075 05:55:33 GMT"
  569. Scenario: Creating a folder with invalid characters
  570. Given using new dav path
  571. And As an "admin"
  572. And user "user0" exists
  573. And user "user1" exists
  574. And As an "user1"
  575. And user "user1" created a folder "/testshare "
  576. Then the HTTP status code should be "400"