1
0

carddav.feature 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. Feature: carddav
  2. Scenario: Accessing a not existing addressbook of another user
  3. Given user "user0" exists
  4. When "admin" requests addressbook "user0/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/"
  5. And The CardDAV exception is "Sabre\DAV\Exception\NotFound"
  6. And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found"
  7. Scenario: Accessing a not shared addressbook of another user
  8. Given user "user0" exists
  9. Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201"
  10. When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/"
  11. And The CardDAV exception is "Sabre\DAV\Exception\NotFound"
  12. And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found"
  13. Scenario: Accessing a not existing addressbook of another user via legacy endpoint
  14. Given user "user0" exists
  15. When "admin" requests addressbook "user0/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/carddav/addressbooks/"
  16. And The CardDAV exception is "Sabre\DAV\Exception\NotFound"
  17. And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found"
  18. Scenario: Accessing a not shared addressbook of another user via legacy endpoint
  19. Given user "user0" exists
  20. Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201"
  21. When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/carddav/addressbooks/"
  22. And The CardDAV exception is "Sabre\DAV\Exception\NotFound"
  23. And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found"
  24. Scenario: Accessing a not existing addressbook of myself
  25. Given user "user0" exists
  26. When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/"
  27. And The CardDAV exception is "Sabre\DAV\Exception\NotFound"
  28. And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found"
  29. Scenario: Creating a new addressbook
  30. When "admin" creates an addressbook named "MyAddressbook" with statuscode "201"
  31. Then "admin" requests addressbook "admin/MyAddressbook" with statuscode "207" on the endpoint "/remote.php/dav/addressbooks/users/"
  32. Scenario: Accessing ones own contact
  33. Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201"
  34. Given "admin" uploads the contact "bjoern.vcf" to the addressbook "MyAddressbook"
  35. When Downloading the contact "bjoern.vcf" from addressbook "MyAddressbook" as user "admin"
  36. Then The following HTTP headers should be set
  37. |Content-Disposition|attachment; filename*=UTF-8''bjoern.vcf; filename="bjoern.vcf"|
  38. |Content-Type|text/vcard; charset=utf-8|
  39. |Content-Security-Policy|default-src 'none';|
  40. |X-Content-Type-Options |nosniff|
  41. |X-Download-Options|noopen|
  42. |X-Frame-Options|SAMEORIGIN|
  43. |X-Permitted-Cross-Domain-Policies|none|
  44. |X-Robots-Tag|none|
  45. |X-XSS-Protection|1; mode=block|
  46. Scenario: Exporting the picture of ones own contact
  47. Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201"
  48. Given "admin" uploads the contact "bjoern.vcf" to the addressbook "MyAddressbook"
  49. When Exporting the picture of contact "bjoern.vcf" from addressbook "MyAddressbook" as user "admin"
  50. Then The following HTTP headers should be set
  51. |Content-Disposition|attachment|
  52. |Content-Type|image/jpeg|
  53. |Content-Security-Policy|default-src 'none';|
  54. |X-Content-Type-Options |nosniff|
  55. |X-Download-Options|noopen|
  56. |X-Frame-Options|SAMEORIGIN|
  57. |X-Permitted-Cross-Domain-Policies|none|
  58. |X-Robots-Tag|none|
  59. |X-XSS-Protection|1; mode=block|