1
0

dav-v2-public.feature 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
  2. # SPDX-License-Identifier: AGPL-3.0-or-later
  3. Feature: dav-v2-public
  4. Background:
  5. Given using api version "1"
  6. Scenario: See note to recipient in public shares
  7. Given using new dav path
  8. And As an "admin"
  9. And user "user0" exists
  10. And user "user1" exists
  11. And As an "user1"
  12. And user "user1" created a folder "/testshare"
  13. And as "user1" creating a share with
  14. | path | testshare |
  15. | shareType | 3 |
  16. | permissions | 1 |
  17. | note | Hello |
  18. And As an "user0"
  19. Given using new public dav path
  20. When Requesting share note on dav endpoint
  21. Then the single response should contain a property "{http://nextcloud.org/ns}note" with value "Hello"
  22. Scenario: Downloading a file from public share with Ajax header
  23. Given using new dav path
  24. And As an "admin"
  25. And user "user0" exists
  26. And user "user1" exists
  27. And As an "user1"
  28. And user "user1" created a folder "/testshare"
  29. When User "user1" uploads file "data/green-square-256.png" to "/testshare/image.png"
  30. And as "user1" creating a share with
  31. | path | testshare |
  32. | shareType | 3 |
  33. | permissions | 1 |
  34. And As an "user0"
  35. Given using new public dav path
  36. When Downloading public file "/image.png"
  37. Then the downloaded file has the content of "/testshare/image.png" from "user1" data
  38. # Test that downloading files work to ensure e.g. the viewer works or files can be downloaded
  39. Scenario: Downloading a file from public share without Ajax header and disabled s2s share
  40. Given using new dav path
  41. And As an "admin"
  42. And user "user0" exists
  43. And user "user1" exists
  44. And As an "user1"
  45. And user "user1" created a folder "/testshare"
  46. When User "user1" uploads file "data/green-square-256.png" to "/testshare/image.png"
  47. And as "user1" creating a share with
  48. | path | testshare |
  49. | shareType | 3 |
  50. | permissions | 1 |
  51. And As an "user0"
  52. Given parameter "outgoing_server2server_share_enabled" of app "files_sharing" is set to "no"
  53. Given using new public dav path
  54. When Downloading public file "/image.png" without ajax header
  55. Then the downloaded file has the content of "/testshare/image.png" from "user1" data
  56. Scenario: Download a folder
  57. Given using new dav path
  58. And As an "admin"
  59. And user "user0" exists
  60. And user "user0" created a folder "/testshare"
  61. And user "user0" created a folder "/testshare/testFolder"
  62. When User "user0" uploads file "data/textfile.txt" to "/testshare/testFolder/text.txt"
  63. When User "user0" uploads file "data/green-square-256.png" to "/testshare/testFolder/image.png"
  64. And as "user0" creating a share with
  65. | path | testshare |
  66. | shareType | 3 |
  67. | permissions | 1 |
  68. And As an "user1"
  69. Given using new public dav path
  70. When Downloading public folder "testFolder"
  71. Then the downloaded file is a zip file
  72. Then the downloaded zip file contains a folder named "testFolder/"
  73. And the downloaded zip file contains a file named "testFolder/text.txt" with the contents of "/testshare/testFolder/text.txt" from "user0" data
  74. And the downloaded zip file contains a file named "testFolder/image.png" with the contents of "/testshare/testFolder/image.png" from "user0" data