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.

dav-v2.feature 3.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. Feature: dav-v2
  2. Background:
  3. Given using api version "1"
  4. Scenario: moving a file new endpoint way
  5. Given using new dav path
  6. And As an "admin"
  7. And user "user0" exists
  8. When User "user0" moves file "/textfile0.txt" to "/FOLDER/textfile0.txt"
  9. Then the HTTP status code should be "201"
  10. Scenario: download a file with range using new endpoint
  11. Given using new dav path
  12. And As an "admin"
  13. And user "user0" exists
  14. And As an "user0"
  15. When Downloading file "/welcome.txt" with range "bytes=52-78"
  16. Then Downloaded content should be "example file for developers"
  17. Scenario: Downloading a file on the new endpoint should serve security headers
  18. Given using new dav path
  19. And As an "admin"
  20. When Downloading file "/welcome.txt"
  21. Then The following headers should be set
  22. |Content-Disposition|attachment; filename*=UTF-8''welcome.txt; filename="welcome.txt"|
  23. |Content-Security-Policy|default-src 'none';|
  24. |X-Content-Type-Options |nosniff|
  25. |X-Frame-Options|SAMEORIGIN|
  26. |X-Permitted-Cross-Domain-Policies|none|
  27. |X-Robots-Tag|none|
  28. |X-XSS-Protection|1; mode=block|
  29. And Downloaded content should start with "Welcome to your Nextcloud account!"
  30. Scenario: Doing a GET with a web login should work without CSRF token on the new backend
  31. Given Logging in using web as "admin"
  32. When Sending a "GET" to "/remote.php/dav/files/admin/welcome.txt" without requesttoken
  33. Then Downloaded content should start with "Welcome to your Nextcloud account!"
  34. Then the HTTP status code should be "200"
  35. Scenario: Doing a GET with a web login should work with CSRF token on the new backend
  36. Given Logging in using web as "admin"
  37. When Sending a "GET" to "/remote.php/dav/files/admin/welcome.txt" with requesttoken
  38. Then Downloaded content should start with "Welcome to your Nextcloud account!"
  39. Then the HTTP status code should be "200"
  40. Scenario: Doing a PROPFIND with a web login should not work without CSRF token on the new backend
  41. Given Logging in using web as "admin"
  42. When Sending a "PROPFIND" to "/remote.php/dav/files/admin/welcome.txt" without requesttoken
  43. Then the HTTP status code should be "401"
  44. Scenario: Doing a PROPFIND with a web login should work with CSRF token on the new backend
  45. Given Logging in using web as "admin"
  46. When Sending a "PROPFIND" to "/remote.php/dav/files/admin/welcome.txt" with requesttoken
  47. Then the HTTP status code should be "207"
  48. Scenario: Uploading a file having 0B as quota
  49. Given using new dav path
  50. And As an "admin"
  51. And user "user0" exists
  52. And user "user0" has a quota of "0 B"
  53. And As an "user0"
  54. When User "user0" uploads file "data/textfile.txt" to "/asdf.txt"
  55. Then the HTTP status code should be "507"
  56. Scenario: Uploading a file as recipient using webdav new endpoint having quota
  57. Given using new dav path
  58. And As an "admin"
  59. And user "user0" exists
  60. And user "user1" exists
  61. And user "user0" has a quota of "10 MB"
  62. And user "user1" has a quota of "10 MB"
  63. And As an "user1"
  64. And user "user1" created a folder "/testquota"
  65. And as "user1" creating a share with
  66. | path | testquota |
  67. | shareType | 0 |
  68. | permissions | 31 |
  69. | shareWith | user0 |
  70. And user "user0" accepts last share
  71. And As an "user0"
  72. When User "user0" uploads file "data/textfile.txt" to "/testquota/asdf.txt"
  73. Then the HTTP status code should be "201"