dav-v2-public.feature 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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: Downloading a file from public share with Ajax header
  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. When User "user1" uploads file "data/green-square-256.png" to "/testshare/image.png"
  14. And as "user1" creating a share with
  15. | path | testshare |
  16. | shareType | 3 |
  17. | permissions | 1 |
  18. And As an "user0"
  19. Given using new public dav path
  20. When Downloading public file "/image.png"
  21. Then the downloaded file has the content of "/testshare/image.png" from "user1" data
  22. # Test that downloading files work to ensure e.g. the viewer works or files can be downloaded
  23. Scenario: Downloading a file from public share without Ajax header and disabled s2s share
  24. Given using new dav path
  25. And As an "admin"
  26. And user "user0" exists
  27. And user "user1" exists
  28. And As an "user1"
  29. And user "user1" created a folder "/testshare"
  30. When User "user1" uploads file "data/green-square-256.png" to "/testshare/image.png"
  31. And as "user1" creating a share with
  32. | path | testshare |
  33. | shareType | 3 |
  34. | permissions | 1 |
  35. And As an "user0"
  36. Given parameter "outgoing_server2server_share_enabled" of app "files_sharing" is set to "no"
  37. Given using new public dav path
  38. When Downloading public file "/image.png" without ajax header
  39. Then the downloaded file has the content of "/testshare/image.png" from "user1" data