dav-v2-public.feature 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # SPDX-FileCopyrightText: 2023 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