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.

carddav.feature 3.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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-Frame-Options|SAMEORIGIN|
  42. |X-Permitted-Cross-Domain-Policies|none|
  43. |X-Robots-Tag|none|
  44. |X-XSS-Protection|1; mode=block|
  45. Scenario: Exporting the picture of ones own contact
  46. Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201"
  47. Given "admin" uploads the contact "bjoern.vcf" to the addressbook "MyAddressbook"
  48. When Exporting the picture of contact "bjoern.vcf" from addressbook "MyAddressbook" as user "admin"
  49. Then The following HTTP headers should be set
  50. |Content-Disposition|attachment; filename=bjoern.vcf.jpg|
  51. |Content-Type|image/jpeg|
  52. |Content-Security-Policy|default-src 'none';|
  53. |X-Content-Type-Options |nosniff|
  54. |X-Frame-Options|SAMEORIGIN|
  55. |X-Permitted-Cross-Domain-Policies|none|
  56. |X-Robots-Tag|none|
  57. |X-XSS-Protection|1; mode=block|